![]() ![]() ![]() In other words, I'd like to be able to do something like:īy group: egen regression coefficients =regress(var1 var2 var3 var4)īut I want to save the results and do further analysis on them rather than just displaying them. This unit will cover a number of Stata commands that you have not seen before. ![]() I want to collapse my dataset by a group variable and retain the regression coefficient of the independent variables. The regression model can be fitted with the command regress. 3) for an introduction to linear regression using Stata.Dohoo, Martin, and Stryhn(2012,2010) discuss linear regression using examples from epidemiology, and Stata datasets and do-les used in the text are available. We can tell stata to treat group as a categorical variable by adding i. We have also used the option ' base ' to indicate the category we would want to use for the baseline comparison group. regress Linear regression 5 SeeHamilton(2013, chap. before ses indicates that ses is a indicator variable (i.e., categorical variable), and that it should be included in the model. There is a shortcut in Stata that eliminates the need to create all the dummy variables. Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at . Below we use the mlogit command to estimate a multinomial logistic regression model. regression, and it exploits within-group variation over time. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |