Graph convex hulls [STB-23: gr16] ------------------ ^condraw^ varlist^,^ ^gr^no^(^#^)^ ^h^ull^(^#^)^ [ ^d^r^(^str^)^ ^g^roup^(^str^)^ ^v^id^(^str^)^ ] graphs the convex hulls generated by the ^conhull^ ado-file. The varlist contains the names of the variables containing the x and y coordinates of points and the name of the variable containing the convex hull number. ^condraw^ generates new variables for graphing the hulls and adds new observations so Stata can connect the points on the hull. After the graph is displayed, the user can redraw the graph with different options and/or save it. There are three ways to use ^condraw^: 1. ^condraw x y conhull^ assumes that ^conhull^ generated one or more hulls for the entire set of points and placed them in the variable ^conhull^. Since the ^hull()^ is not specified, the outermost convex hull is graphed. The command ^condraw y conhull, hu(2)^ graphs the second hull. 2. ^condraw x y conhull, gr(smoke)^ assumes that ^conhull^ generated one or more hulls for each class of the categorical variable ^smoke^. Without the ^hull()^ option, the outermost hull for each class is graphed. The command ^condraw x y conhull, g(smoke) h(3)^ graphs the third hull for each class of the categorical variable. 3. ^condraw x y conhull, g(smoke) gr(2) h(2)^ assumes that ^conhull^ generated one or more hulls for each class of the categorical variable ^smoke^, but the user desires to graph only the second outermost hull for the second level of ^smoke^. Note that using ^condraw x y conhull^ on a data set for which ^conhull^ generated hulls for each class of a categorical variable will produce a graph in which the points are not connected properly. Options ------- ^d^r^(^str^)^ names a marker variable that allows the points in the graph to be closed. The default is ^dr^. As this is not a temporary variable a ^dr already defined^ error message will appear if you use the default and your data set contains a variable named ^dr^. ^gr^no^(^#^)^ specifies which class of the categorical variable identified by ^g^roup(str) is to be used in the graph. The default is to use all classes. If more than one, but fewer than all, classes are desired the user should use the default option and then eliminate the undesired classes when regraphing the data. ^g^roup^(^str^)^ is the name of a categorical variable for which convex hulls were generated. The default is to assume the entire sample was used to generate the hulls. ^h^ull^(^#^)^ specifies the hull to be graphed. The default is to graph the outermost hull. ^v^id^(^str^)^ names the new variables needed for graphing the hulls. The default is ^hv*^. ^condraw x y,g(smoke) h(3)^ graphs the third outermost hull for the levels of the categorical variable ^smoke^. If ^smoke^ has three levels three new variables are created: ^hv1^ ^hv2^ ^hv3^. As these are not temporary variables, an ^hv1 already defined^ error message will appear if you use the default and your data set contains a variable named ^hv1^. Authors ------ J. Patrick Gray Department of Anthropology University of Wisconsin-Milwaukee Milwaukee, WI 53201 jpgray@@alpha1.csd.uwm.edu Tim McGuire Pillsbury College Owatonna, MN 55060 Also see -------- STB: gr16 (STB-23) On-line: ^help^ for @conhull@