All of the examples in this chapter use the whas100 data. use https://stats.idre.ucla.edu/stat/examples/asa2/whas100, clear Table 8.1 on page 250. generate time=foltime/365.25 stset time, fail(folstatus) streg gender, dist(exp) nolog nohr time…
Read More
Search Results for: stata
Applied Survival Analysis by Hosmer, Lemeshow and May Chapter 9: Other Models and Topics | Stata Textbook Examples
We present tables 9.2 and 9.3 below. The rest of the chapter has been skipped for now. We will complete it as time permits. Table 9.2 on page 293 using…
Read More
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 10: Canonical Correlation Analysis | Stata Textbook Examples
Table 10.1, page 235. use https://stats.idre.ucla.edu/stat/stata/examples/cama4/depress, clear generate sex1 = sex – 1 tabstat cesd health sex1 age educat income, statistics(mean sd) col(stat) variable | mean sd ————-+——————– cesd |…
Read More
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 11: Discriminant Analysis | Stata Textbook Examples
Table 11.1, page 252. use https://stats.idre.ucla.edu/stat/stata/examples/cama4/depress, clear sort cases by cases: tabstat sex age educat income health beddays acuteill chronill, statistics(mean sd) _______________________________________________________________________________ -> cases = normal stats | sex…
Read More
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 12: Logistic Regression | Stata Textbook Examples
Page 283. The coefficients at the top of the page. use https://stats.idre.ucla.edu/stat/stata/examples/cama4/depress, clear logit cases age income Iteration 0: log likelihood = -134.06225 Iteration 1: log likelihood = -127.42024 Iteration…
Read More
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 13: Regression Analysis using Survival Data | Stata Textbook Examples
Table 13.2, page 341. 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
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 14: Principal Components Analysis | Stata Textbook Examples
Table 14.2, page 380. NOTE: The values shown in the text are listed as eigenvectors in the Stata output. use https://stats.idre.ucla.edu/stat/stata/examples/cama4/depress, clear factor c1-c20, factors(5) pc (obs=294) (principal components; 5…
Read More
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 15: Factor analysis | Stata Textbook Examples
Table 15.7, page 410. NOTE: The horst option on the rotate command standardizes the initial factor loadings for each variable to have a length of one before the rotation is…
Read More
Computer-Aided Multivariate Analysis by, Fourth Edition, Afifi, Clark and May Chapter 16: Cluster Analysis | Stata Textbook Examples
Table 16.2, page 422. use https://stats.idre.ucla.edu/stat/stata/examples/cama3/companies, clear egen st1 = std(ror5) egen st2 = std(de) egen st3 = std(salesgr5) egen st4 = std(eps5) egen st5 = std(npm1) egen st6 =…
Read More
Computer-Aided Multivariate Analysis, Fourth Edition, by Afifi, Clark and May Chapter 17: Log-linear Analysis | Stata Textbook Examples
Table 17.1, page 447. use https://stats.idre.ucla.edu/stat/stata/examples/cama4/depress, clear gen incomecat = 0 replace incomecat = 1 if income >= 20 tab2 sex incomecat | incomecat sex | 0 1 | Total…
Read More
