bulktore.blogg.se

Stata regress by group
Stata regress by group














We are interested in the levels that begin with _r, so I have omitted much of the output. N_cds Number of completely determined successes N_cdf Number of completely determined failures Let’s type collect label list to view the levels and their labels. Table automatically created a collection named Table, and we can view the dimensions by typing collect dims. | logistic highbp c.age#i.sex i.diabetesīy default, the table displays the coefficients, which are actually odds ratios because we used the logistic command. > command(logistic highbp c.age#i.sex i.diabetes) There are no row dimensions, and the column dimensions are command and result. Let’s begin by placing the logistic regression command in the command() option of a table command. Logistic regression Number of obs = 10,349 Note that I have used Stata’s factor-variable notation in the example below to include the main effect of the continuous variable age, the main effect of the categorical variables sex and diabetes, and the interaction of age and sex. We would like to fit a logistic regression model for the binary outcome highbp and create a table of the odds ratios, standard errors, z statistics, p-values, and confidence intervals. The dataset includes age, sex, an indicator for high blood pressure ( highbp), and an indicator for diabetes ( diabetes). (Second National Health and Nutrition Examination Survey)ĭiabetes byte %12.0g diabetes Diabetes status Let’s begin by typing webuse nhanes2l to open the NHANES dataset, and let’s type describe to examine some of the variables.

stata regress by group

Our goal is to create the table in the Microsoft Word document below.

#Stata regress by group how to#

In this post, I want to show you how to use the command() option to create a table for a single regression model. In my last post, I showed you how to use the new and improved table command with the command() option to create a table of statistical tests.














Stata regress by group