Randomized block type designs are relatively common in certain fields. Balanced randomized designs can be analyzed using traditional anova and regression methods but unbalanced designs require the use of maximum…
Read More
Search Results for: stata
How can I read data from multiple Excel sheets in Stata? | Stata FAQ
Beginning in Stata 12 you can read Excel (.xls and .xlsx) files directly using the import excel command. The sheet() option allows us top specify from which sheet of the spreadsheet…
Read More
How do I read a data file that has commas or tabs as delimeters? | Stata FAQ
Consider the file below that contains four variables, make, mpg, weight, and price. The file looks like what is shown below (the variable names are indeed the first line of…
Read More
How can I compute effect size in Stata for regression? | Stata FAQ
Two of the more common measures of effect size for regression analysis are eta2 and partial eta2. Eta2 is the proportion of the total variance that is attributed to an…
Read More
How can I extract a portion of a string variable using regular expressions? | Stata FAQ
String processing is fairly easy in Stata because of the many built-in string functions. Among these string functions are three functions that are related to regular expressions, regexm for matching,…
Read More
How can I estimate relative risk using glm for common outcomes in cohort studies? | Stata FAQ
Credits This page was developed and written by Karla Lindquist, Senior Statistician in the Division of Geriatrics at UCSF. We are very grateful to Karla for taking the time to…
Read More
How can I test simple effects in repeated measures models? | Stata FAQ
Testing simple effects in repeated measures models that have both between-subjects and within-subjects effects can be tricky. We will look at two different estimation approaches, linear mixed model and anova….
Read More
How can I access information stored after I run a command in Stata (returned results)? | Stata FAQ
In addition to the output in the shown in the results window, many of Stata’s commands store information about the command and it’s results in memory. This allows the user,…
Read More
What is the difference between xtreg, re and xtreg, fe? | Stata FAQ
xtreg with its various options performs regression analysis on panel datasets. In this FAQ we will try to explain the differences between xtreg, re and xtreg, fe with an example…
Read More
How can I test the difference in area under ROC curve for two logistic regression models? | Stata FAQ
In Stata it is very easy to get the area under the ROC curve following either logit or logistic by using the lroc command. However, with lroc you cannot compare…
Read More
