The purpose of this seminar is to explore how to analyze survey data collected under different sampling plans using Stata 9. Other examples, including those using other survey data analysis packages,…
Read More
Search Results for: stata
Stata Class Notes: Exploring Data
1.0 Stata commands in this unit use Load dataset into memory describe Describe a dataset list List the contents of a dataset codebook Detailed contents of a dataset labelbook Information…
Read More
Stata Class Notes: Modifying Data
1.0 Stata commands in this unit codebook Show codebook information for file order Order the variables in a data set label data Apply a label to a data set label…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 10
Table 10.1, page 225. use https://stats.idre.ucla.edu/stat/stata/examples/pma5/depress, clear generate sex1 = sex – 1 tabstat cesd health sex1 age educat income, statistics(mean sd) col(stat) variable | mean sd ————-+——————– cesd |…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 11
Table 11.1, page 242. use https://stats.idre.ucla.edu/stat/stata/examples/pma5/depress, clear sort cases by cases: tabstat sex age educat income health beddays acuteill chronill, statistics(mean sd) _______________________________________________________________________________ -> cases = normal stats | sex…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 12
Table 12.1, page 273. use https://stats.idre.ucla.edu/stat/stata/examples/pma5/depress, clear tab sex cases | depressed is cesd >=16 | sex | normal depressed | Total ———–+———————-+———- male | 101 10 | 111 female…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 13
Table 13.2, page 330. clear input id years dead 1 2 1 2 6 1 3 2 0 4 3 0 5 1 1 end ltable years dead, noadj intervals(0,1,2,6)…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 14
Table 14.2, page 369. NOTE: The values shown in the text are listed as eigenvectors in the Stata output. use https://stats.idre.ucla.edu/stat/stata/examples/pma5/depress, clear pca c1-c20, factors(5) Principal components/correlation Number of obs…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 15
Version info: Code for this page was tested in Stata 12.1. Table 15.7, page 398. NOTE: The horst option on the rotate command standardizes the initial factor loadings for each…
Read More
Stata: Practical Multivariate Analysis by Afifi, May and Clark, Chapter 16
Version info: Code for this page was tested in Stata 12.1. Table 16.2, page 410. use https://stats.idre.ucla.edu/stat/stata/examples/pma5/companies, clear local i = 1 foreach var of varlist ror5-payoutr1 { egen z`i’…
Read More