We now run the same regression but with working_part as the dependent variable and we store the estimates in a variable called Probit working_full violence_level $demographics $household i.state_idĪfter the first regression, we store the estimates in a variable called Global household male_household age_head_household father_alive mother_alive edu_father_primary edu_father_secondary edu_mother_primary edu_mother_secondary nb_rooms_for_sleeping nb_hh_members urban Global demographics age male first_children son_daughter_to_head We estimate the following two equations (after defining global macros to capture the names of the variables): We want to look at the relationship between level of street violence (crime) to the likelihood of working.
#STATA XLINE COLOR FULL#
The data set includes demographics and an outcome variable that is whether a person is working full time or part time.
#STATA XLINE COLOR INSTALL#
This type of coefficient presentation is gaining interest among researchers and is often easier to show during presentations.įirst of all we need to install the command into Stata: type the following: This command presents coefficients from regressions in a graphic rather than as numbers in a table. This gives us a completely different look using the same command but under a different scheme. Twoway (scatter adult_unemployment_rate jail_use, mcolor(green%60)) (scatter youth_unemployment_rate jail_use, mcolor(red%10)), scheme(plottig) Now let us run the same command and add the option ,scheme(plotting) Twoway (scatter adult_unemployment_rate jail_use, mcolor(green%60)) (scatter youth_unemployment_rate jail_use, mcolor(red%10))įirst of all we need to install this new scheme into Stata type the following:
#STATA XLINE COLOR SERIES#
We can add another series and change the transparency levels for each series: Twoway (scatter adult_unemployment_rate jail_use, mcolor(green%60)) Twoway (scatter adult_unemployment_rate jail_use, mcolor(%20)) Let us try: ,mcolor(%20) to show the new transparency feature. We can change the colors and how transparent are the dots. Twoway (scatter adult_unemployment_rate jail_use, mcolor(%60)) We now add the option ,mcolor(%60) to show the new transparency feature. Twoway (scatter adult_unemployment_rate jail_use) Using the city_data file let us draw a simple scatter plot that shows the relationship between the share of jail being full and the adult unemployment rate across 75 cities (Note: the data is fictitious and was created for illustrative purposes only). Stata 15 introduces a new feature that allows the user to make Stata graph’s elements to be transparent rather than just opaque. The second and third are user created commands. The first one is the new transparency feature in Stata 15.
In the following post, we look at three features in graphics. Stata offers an impressive set of options to create graphs. More data is available than any point in history and often a simple graph can go a long way in presenting complex relationships between data elements.