Stata Press Publication index Symbols β weights 278 η2226 φ 133 * comment 85 /* and */ comment 85...
Transcript of Stata Press Publication index Symbols β weights 278 η2226 φ 133 * comment 85 /* and */ comment 85...
Subject index
Symbolsβ weights . . . . . . . . . . . . . . . . . . . . . . . . . . 278η2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226φ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133* comment . . . . . . . . . . . . . . . . . . . . . . . . . 85/* and */ comment. . . . . . . . . . . . . . . . .85
Aacquiring datasets . . . . . . . . . . . . .525–526add, label define option . . . . . . . . . . . 2agreement, intraclass correlation . . . 260alpha reliability. . . . . . . . . . . . . . . . . . . .377ameans command . . . . . . . . . . . . . . . . . . . 97analysis of covariance . . . . . see ANCOVA
analysis of variance. . . . . . . . .see ANOVA
ANCOVA . . . . . . . . . . . . . . . . . . . . . . 237–248ANOVA,
degrees of freedom . . . . . . . . . . . . 225equal-variance test . . . . . . . . . . . . 225one-way . . . . . . . . . . . . . . . . . . 219–220one-way power analysis . . 232–234,
263–265power analysis . . 232–234, 263–270repeated-measures . . . . . . . . . . . . 255repeated-measures power
analysis . . . . . . . . . . . . . . 267–269two-way . . . . . . . . . . . . . . . . . . 249–255two-way power analysis . . . 265–267
ANOVA assumptions . . . . . . . . . . . . . . . 220ATS at UCLA . . . . . . . . . . . . . . . . . . . . . . 203
Bbar chart . . . . . . . . . . . . . . . . . . . . . 108, 350bar graph of means . . . . . . . . . . . . . . . . 231Bartlett test of equal variances . . . . 225beta weights . . . . . . . . . . . . . . . . . . 210, 278
limitation . . . . . . . . . . . . . . . . . . . . . 313
binary variables . . . . . . . . . . . . . . . . . . . 298binscatter command. . . .197–201, 317block regression . . . . . . . . . . . . . . . 296–305blog . . . . . . . . . . . . . . . . . . . . see Stata BlogBonferroni multiple-comparison test . . .
. . . . . . . . . . 207, 223bookstore, Stata . . . . . . . . . . . . . . . . . . . 522bootstrap estimation of standard errors
. . . . . . . . . . . . . 288bootstrap regression . . . . . . . . . . . . . . . 283Boston College Stata site . . . . . . . . . . 520boundary characteristic curve. .505–506box plot . . . . . . . . . . . . . . . . . . . . . . 118, 237
Ccase, changing . . . . . . . . . . . . . . . . . . . . . . 48casewise deletion . . . . . . . . . . . . . . . . . . 204categorical covariates . . . . . . . . . 239, 243categorical predictors, regression . . . 298categorical variable. . . . . . . . . . . .305–306cause and effect . . . . . . . . . . . . . . . . . . . 195center command . . . . . . . . . . . . . . . . . . 310centering . . . . . . . . . . . . . . . . . . . . . .321–322chi-squared
table . . . . . . . . . . . . . . . . . . . . . . . . . . 129test . . . . . . . . . . . . . . . . . . . . . . 127, 353
chitable command . . . . . . . . . . . 129–131clear command . . . . . . . . . . . . . . . . . . . . 29clonevar command . . . . . . . . . . . . . . . 458cls command . . . . . . . . . . . . . . . . . . . . . . 16codebook command . . . . . 44–45, 55–56,
138codebook example . . . . . . . . . . . . . . . 25–28coding system . . . . . . . . . . . . . . . . . . . 24–28coefficient of variation . . . . . . . . . . . . . 117Cohen’s d . . . . . . . . . . . .170–171, 175–182Cohen’s f . . . . . . . . . . . . . . . . 232–234, 263
538 Subject index
collinearity . . . . . . . . . . . . . . . . . . . . . . . . 292command structure . . . . . . . . . . . . . . . . . 78Command window . . . . . . . . . . . . . . . 8, 10compatibility . . . . . . . . . . . . . . . . . . . . . . . 42confidence interval
regression line . . . . . . . . . . . . . . . . .210slope . . . . . . . . . . . . . . . . . . . . . . . . . . 210
constant . . . . . . . . . . . . . . . . . . . . . . . . . . . 210continuous covariates. . . . . . . . . .239–241continuous variable . . . . . . . . . . . . . . . . 317conventions used in the book. . . . . . . . .1copying, HTML format. . . . . . . . . . .19, 89copying results to word processor. . .19,
88correlate command. . . . . . . . . .204–205correlation,
interpreting . . . . . . . . . . . . . . . . . . . 201limitation . . . . . . . . . . . . . . . . . . . . . 313multiple comparison. . . . . . . . . . .207
correlation ratio . . . . . . . . . . 226, 247–248count outcome variables . . . . . . . . . . . 341Cramer’s V , measure of association . . .
. . . . . . . . . . . . . 133creating value labels . . . . . . . . . . . . . 57–60criterion-related validity . . . . . . . . . . . 384cross-tabulation . . . . . . . . . . . . . . . . . . . 124curve fitting. . . . . . . . . . . . . . . . . . .315–321
Ddata,
long format . . . . . . . . . . . . . . 162, 221wide format . . . . . . . . . . . . . . 160, 221
Data Editor . . . . . . . . . . . . . . 29–33, 40–41dataset contents . . . . . . . . . . . . . . . . . . . . 43dataset,
acquisition . . . . . . . . . . . . . . . 525–526c10interaction . . . . . . . . . 307, 330c11barchart . . . . . . . . . . . . . . . . . .350cancer . . . . . . . . . . . . . . . . . . . . . 10, 11census . . . . . . . . . . . . . . . . . . . . . . . .329censusfv . . . . . . . . . . . . . . . . . . . . . . 20chapter6 aspirin . . . . . . . . . . . . 136chapter13 missing . . . . . . . . . . . 407chores . . . . . . . . . . . . . . . . . . . . . . . .173
dataset, continuedcreate . . . . . . . . . . . . . . . . . . . . . . 21–23depression . . . . . . . . . . . . . . . . . . . 216descriptive gss . . . .100, 120, 121divorce . . . . . . . . . . . . . . . . . . . . . . 335download. . . . . . . . . . .xxxv, 525–526environ . . . . . . . . . . . . . . . . . . . . . . 338firstsurvey . . . . . . . . . . . . . . . . . . . 43firstsurvey chapter4 . . . . 80, 85,
92flourishing bmi . . . . . . . . 422, 423gss2002 and 2006 chapter12 . . . .
. . . . . . . . . . . . . 400gss2002 chapter6 . . . . . . . 148, 149gss2002 chapter7 . . 157, 163, 164,
166, 173, 187gss2002 chapter8 . . . . . . . . . . . . 216gss2002 chapter9 . . . . . . . . . . . . 271gss2002 chapter10 . . . . . 329, 330,
448gss2002 chapter11 . . . . . . . . . . . 367gss2006 chapter6 . . 124, 137, 142,
145, 148gss2006 chapter6 10percent . . . .
. . . . . . . . . . . . . 145gss2006 chapter8 . . 190, 215, 216gss2006 chapter8 selected . .207gss2006 chapter9 . . . . . . . 229, 238gss2006 chapter9 2way . . . . . . 249gss2006 chapter12 . . . . . . 370, 377gss2006 chapter12 selected . . . .
. . . . . . . . . . . . . 391intraclass . . . . . . . . . . . . . . . . . . . 261kappa1 . . . . . . . . . . . . . . . . . . . . . . . .381kuder-richardson . . . . . . . . . . . .379long . . . . . . . . . . . . . . . . . . . . . . . . . . 162longitudinal exercise . . . . . . 479longitudinal mixed . . . . . . . . . .456nlsw88 . . . . . . . . . . . . . . . . . . . . . . . .331nlsy97 chapter7 . . . . . . . . 182, 186nlsy97 chapter11 . . . . . . . 341, 353nlsy97 selected variables . . . . .
. . . . . . . . . . 271, 296ops2004 . . . . . . . . . . . . . . . . . .274, 420partyid . . . . . . . . . . . . . 222, 235, 271
Subject index 539
dataset, continuedpositive . . . . . . . . . . . . . . . . . . . . . . 75regsmpl . . . . . . . . . . . . . 315, 407, 449relate . . . . . . . . . . . . . . . xxxv, 52, 75relate small . . . . . . . . . . . . . . . xxxvretest . . . . . . . . . . . . . . . . . . . . . . . .375severity . . . . . . . . . . . . . . . . . . . . . 366spearman . . . . . . . . . . . . . . . . 212, 216wide . . . . . . . . . . . . . . . . . . . . . . . . . . 159wide9 . . . . . . . . . . . . . . . . . . . . . . . . . 256
degrees of freedom, . . . . . . . . . . . . . . . . 129ANOVA . . . . . . . . . . . . . . . . . . . . . . . . 225one-sample t test . . . . . . . . . . . . . . 166
dependent t test . . . . . . . . . . . . . . . . . . . 173dependent variable . . . . . . . . . . . . . . . . 126describe command . . . . . . 10, 46–47, 53dfbeta command . . . . . . . . . . . . . 291–292dialog box,
alpha . . . . . . . . . . . . . . . . . . . . . . . . . 377anova . . . . . . . . . . . . . . . . . . . . . . . . . 249codebook . . . . . . . . . . . . . . . . . . . 44–45correlate . . . . . . . . . . . . . . . . . . . . 204describe . . . . . . . . . . . . . . . . . . . 46–47egen . . . . . . . . . . . . . . . . . . . . . . . .70–72generate . . . . . . . . . . . . . . . 65, 67–68graph bar . . . . . . . . . . .143–144, 231graph box . . . . . . . . . . . . . . . . . . . . 237graph hbox . . . . . . . . . . . . . . . . . . . 118graph pie . . . . . . . . . . . . . . . . . . . . 104histogram . . . . . . . . 14–15, 108–110kwallis . . . . . . . . . . . . . . . . . . . . . . 235lfit . . . . . . . . . . . . . . . . . . . . . . . . . . 211logistic . . . . . . . . . . . . . . . . .342–343margins . . . . . . . . 242, 244–245, 251nestreg . . . . . . . . . . . . . . . . . . . . . . 323oneway . . . . . . . . . . . . . . . . . . . 222–223open . . . . . . . . . . . . . . . . . . . . . . . . . . . 66pcorr . . . . . . . . . . . . . . . . . . . . 279–280power . . . . . . . . . . . . . . . . . . . . 178–179prtest . . . . . . . . . . . . . . . . . . . 157–163recode . . . . . . . . . . . . . . . . 61–62, 297regress . . . . . . . . . . . . . . . . . .208, 275rename . . . . . . . . . . . . . . . . . . . . . . . . . 57rvplot . . . . . . . . . . . . . . . . . . . . . . . .286scatter . . . . . . . . . . . . . . . . . . 191–196
dialog box, continuedsdtest . . . . . . . . . . . . . . . . . . . . . . . .171sktest . . . . . . . . . . . . . . . . . . . . . . . .113Submit vs. OK . . . . . . . . . . . . . . . . . 17summarize . . . . . . . . . . . . . . . . . . . . . 11tab1 . . . . . . . . . . . . . . . . . . . . . . . . . . 100tabi . . . . . . . . . . . . . . . . . . . . . 140–141table . . . . . . . . . . . . . . . . . . . . . . . . . 142tabstat . . . . . . . . . . . . . . . . . . . . . . 117tabulate . . . . . 68–69, 124–128, 138ttest . . . . . . 164–165, 168–170, 173
dictionary file . . . . . . . . . . . . . . . . . . . . . . . 52difference of means test . . . . . . . . . . . . 166difference of proportions test. . . . . . .159discontinuity graph . . . . . . . . . . . 199–201display command. . . . . . .170–171, 348,
439–440do-file,
continuation line . . . . . . . . . . . . . . 167introduction . . . . . . . . . . . . . . . . . . . . . 6
Do-file Editor . . . . . . . . . . . . . . . . . . . 83–87download datasets . . . . . . . . . . . . 525–526drop command . . . . . . . . . . . . . . . . . . . . . 73dummy variables . . . . . . . . . . . . . . . . . . 298
Eeffect size . . . . . . . 170–171, 226, 247, 279
η2 . . . . . . . . . . . . . . . . . . . 226, 247–248egen command . . . . . . . . . 65, 70–72, 371egen count command . . . . . . . . . . . . . 371egen rowmean command . . . . . . . 72, 371egen rowmiss command. . . . . . . . . . . . 71egenmore command . . . . . . . . . . . . . . . . 71entering data . . . . . . . . . . . . . . . . . . . . 29–33equal variance, Bartlett test . . . . . . . 225esize command . . . . . . . . . . . . . . 170–171estat esize command . . . . . . . 247–248estat report command . . . . . . 490–491estat vif postestimation command . .
. . . . . . . . . . .293–294estimates store command . . . . . . . 353Excel
exporting data . . . . . . . . . . . . . . 47–48importing data . . . . . . . . . . . . . 47–48
exit Stata . . . . . . . . . . . . . . . . . . . . . . . 18, 43
540 Subject index
exponentiation. . . . . . . . . . . . . . . . . . . . .348external validity . . . . . . . . . . . . . . . . . . . 204
FF ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225F test of unequal variances . . . . . . . . 172Facebook . . . . . . . see Stata on Facebookfactor analysis, . . . . . . . . . . . . . . . . . . . . 386
commonality . . . . . . . . . . . . . . . . . . 389eigenvalue . . . . . . . . . . . . . . . . 389, 394exploratory factor analysis . . . . 387extraction. . . . . . . . . . . . . . . . . . . . .389factor score . . . . . . . . . . . . . . 389, 398loading . . . . . . . . . . . . . . . . . . . . . . . 389oblique rotation . . . . . . . . . . 389, 396orthogonal rotation. . . . . . .389, 395PCF . . . . . . . . . . . . . . . . . . . . . . . . . . . 388PF . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387postestimation . . . . . . . . . . . . . . . . 390principal component analysis . . 388principal-component factor analy-
sis . . . . . . . . . . . . . . . . . . . . . . . . 388promax . . . . . . . . . . . . . . . . . . . . . . . 396rotation . . . . . . . . . . . . . . . . . . . . . . . 389scree plot . . . . . . . . . . . . . . . . 389, 394simple structure. . . . . . . . . . . . . . .389varimax . . . . . . . . . . . . . . . . . . . . . . . 395
factor variable . . . . . . . . . . . . . . . . 305–306fixed effects . . . . . . . . . . . . . . . . . . . 453–454fonts, fixed . . . . . . . . . . . . . . . . . . . . . . . . . 88format,
numeric . . . . . . . . . . . . . . . . . . . . . . . . 31string . . . . . . . . . . . . . . . . . . . . . . . . . . 32
fre command . . . . . . . . . . . . . . . . . 102–104frequency distributions . . . . . . . . . . . . 101ftable command . . . . . . . . . . . . . . . . . . 225full mediation . . . . . . . . . . . . . . . . . . . . . 443
Ggamma, measure of association . . . . 138generalized linear model . . . . . . .435–436generalized structural equation model-
ing. . . . . . . . . . . . . . . . . . .421–449generate command . . . . . . . . . . . . . 65–70geometric mean . . . . . . . . . . . . . . . . . . . . . 97
glm command . . . . . . . . . . . . . . . . . 435–436Goodman and Kruskal’s gamma, mea-
sure of association . . . . . . . . 138graded response IRT model . . . . 502–509GradPlan. . . . . . . . . . . . . . . . . . . . . . . . . .522graph,
alternative scattergram . . . 197–201bar chart . . . . . . . . . . . . 108, 144, 350box plot . . . . . . . . . . . . . . . . . . . . . . 118collinearity . . . . . . . . . . . . . . . . . . . . 292discontinuity . . . . . . . . . . . . . 199–201hanging rootogram . . . . . . . . . . . . 281heteroskedasticity . . . . . . . . . . . . . 285histogram . . . . . . . . . . . . . . . . 111, 281medians. . . . . . . . . . . . . . . . . . . . . . .237overlay two-way showing
interaction effects. . . . . . . . .308pie chart . . . . . . . . . . . . . . . . . 104–108residual versus fitted . . . . . . . . . . 286scattergram . . . . . . . . . . . . . . 190–197
graph bar command . . . . 143–144, 231,350
graph box command . . . . . . . . . . . . . . 237Graph Editor . . . . . . . . . . . . . . . . . 106–108graphics book . . . . . . . . . . . . . . . . . . . . . 523growth curve . . . . . . . . . . . . . . . . . . . . . . 456gsem command . . . . . . . . . . . 421–449, 453
logistic regression . . . . . . . . . 433–436standardized solution . . . . . . . . . 433
GUI interface . . . . . . . . . . . . . . . . . . . . . . . . .8
Hharmonic mean . . . . . . . . . . . . . . . . . . . . . 97help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
video. . . . . . . . . . . . . . . . . . . . . . . . . . .20web-based. . . . . . . . . . . . . . . . . . . . . .20
help, listcoef option . . . . . . . . 348–350help label command . . . . . . . . . . . . . . 43heteroskedasticity. . . . . . . . . . . . . . . . . .285hierarchical linear models . . . . . 451–480hierarchical regression . . . . . . . . 296–305,
323–325, 360–362histogram . . . . . . . . . . . . . . . . . . . . . . . . . 111histogram command . . . . . . . 13–18, 281
Subject index 541
HLM . . . . . see hierarchical linear modelsHTML format . . . . . . . . . . . . . . . . . . . . . . . 89
IICC . . . . . . . see item characteristic curveimputation . . . . see multiple imputationincrement in R2 . . . . . . . . . . . . . . . . . . . 279independent variable. . . . . . . . . . . . . . .126indicator variables . . . . . . . . . . . . . . . . . 298interaction term. . . . . . . . . . . . . . .306–309interactive table . . . . . . . . . . . . . . . . . . . 140intercept . . . . . . . . . . . . . . . . . . . . . . . . . . 210intercept: growth trajectory . . . . . . . 456interquartile range . . . . . . . . . . . . . . . . . 117interval-level variables . . . . . . . . . . . . . . 96intraclass correlation . . . . . . . . . . 260, 262IRT . . . . . . . . . . . see item response theoryirt 1pl command . . . . . . . . . . . . 490–491irt 2pl command . . . . . . . . . . . . 497–498irt grm command . . . . . . . . . . . . 504–505irtgraph icc command . . . . . 491, 499,
505–506irtgraph iif command . . . . . 493, 500,
507irtgraph tif command . . . . . 494, 501,
508item characteristic curve . . . . . 485, 491,
499item information function graph. . .493,
500, 506–507item response theory . . . . . . . . . . 481–516
Jjitter(), scatter option . . . . . . . . . 194
Kkappa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380kappa, weighted . . . . . . . . . . . . . . . . . . . 382kappa with three raters . . . . . . . . . . . . 382keep command . . . . . . . . . . . . . . . . . . . . . 73Kendall’s tau, measure of association . .
. . . . . . . . . . . . . 138Kruskal–Wallis test, ANOVA alternative
. . . . . . . . . . . . . 235
Kuder–Richardson coefficient ofreliability . . . . . . . . . . . . . . . . . 379
kurtosis . . . . . . . . . . . . . . . . . . . 99, 113, 283
Llabel variable command . . . . . . . . . 59labeling values . . . . . . . . . . . . . . . . . . . . . . 33labeling variables . . . . . . . . . . . . . . . . . . . 23likelihood-ratio chi-squared test . . .353–
354limitations of Stata . . . . . . . . . . . . . . . . 526linear regression. . . . . . . . . . . . . . .421–423list command . . . . . . . . . . . . . 81–82, 222list option, nolabel . . . . . . . . . . . . . .222listcoef command . . . . . . . . . . . 348–350listwise deletion . . . . . . . . . . . . . . . . . . . 204log, .smcl extension . . . . . . . . . . . . . . . . 89log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89log files and graphs . . . . . . . . . . . . . . . . . 90logistic command . . . . . . . . . . . 342–347logistic regression . . . . . . . . 333–367, 441
bar chart. . . . . . . . . . . . . . . . . . . . . .350exponentiation . . . . . . . . . . . . . . . . 348hypothesis tests . . . . . . . . . . . . . . . 353interpreting odds ratio . . . . . . . . 347likelihood-ratio chi-squared test . . .
. . . . . . . . . . . . . 353logits . . . . . . . . . . . . . . . . . . . . . . . . . 340McFadden pseudo-R2 . . . . . . . . . 346nested . . . . . . . . . . . . . . . . . . . . 360–362nonlinear . . . . . . . . . . . . . . . . . . . . . 336odds ratio . . . . . . . . . . . . . . . . . . . . .338percentage change. . . . . . . . . . . . .347pseudo-R2 . . . . . . . . . . . . . . . . . . . . 346S-curve . . . . . . . . . . . . . . . . . . . . . . . 336vs. OLS regression. . . . . . . . . . . . .337Wald chi-squared test . . . . . . . . . 353
logit command . . . . . . . . . 336, 342–347,434–436
logits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340long format . . . . 162, 169, 221, 256–258,
458longitudinal data. . . . . . . . . . . . . .452–453lrdrop1 command . . . . . . . . . . . . 353–354lrtest command . . . . . . . . . . . . . . . . . . 353
542 Subject index
MMAR . . . . . . . . . . . . . . . . . . . . . . . . . . 403–405margins command . . 242, 244–246, 311,
357–359marginsplot command. . . . . . .252–255,
311–312maximum number of variables . . . . . 526MCAR . . . . . . . . . . . . . . . . . . . . . . . . .403–404McFadden pseudo-R2 . . . . . . . . . . . . . . 346mean squares . . . . . . . . . . . . . . . . . . . . . . 225measure of association,
η2 . . . . . . . . . . . . . . . . . . . 226, 247–248φ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133odds ratio . . . . . . . . . . . . . . . . . . . . .135V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
median command . . . . . . . . . . . . . . . . . . 184median, graph box plot . . . . . . . . . . . . 237mediation . . . . . . . . . . . . . . . . . . . . . 442–446
correlated residuals . . . . . . . . . . . 447full . . . . . . . . . . . . . . . . . . . . . . . . . . . 443partial . . . . . . . . . . . . . . . . . . . . . . . . 443
menu, open . . . . . . . . . . . . . . . . . . . . . . . . . 66mi estimate command . . . . . . . 413–414mi impute chained command. . . . .407mi impute command. . . . . . . . . .411–412mi impute mvn command. . . . .407, 412mi register command . . . . . . . . . . . . 411mi set command . . . . . . . . . . . . . 411–412mibeta command . . . . . . . . . . . . . 414–416missing, count . . . . . . . . . . . . . . . . . . . . . 371missing values . . . . . . . . . . .27, 56, 67, 79,
401–420, 456types . . . . . . . . . . . . . . . . . . . . . . . 55, 56
misstable command. . . . . . . . . .408–409mixed command . . . . . . . . . . . . . . 453–474mixed models . . . . . . . . . . . . . . . . . 451–480more command . . . . . . . . . . . . . . . . . . . 4, 44multicollinearity . . . . . . . . . . . . . . . . . . . 292multilevel analysis . . . . . . . . . . . . 451–480multiple comparison,
Bonferroni . . . . . . . . . . . . . . . . . . . . 223Scheffe . . . . . . . . . . . . . . . . . . . . . . . . 223
Sidak . . . . . . . . . . . . . . . . . . . . . . . . . 223multiple comparison and correlation . . .
. . . . . . . . . . . . . 207
multiple correlation . . . . . . . . . . . . . . . . 276multiple imputation . . . . . . . . . . . 401–420multiple regression command. .275–279multiple regression diagnostics . . . . . 288multiple regression with interaction
term . . . . . . . . . . . . . . . . . 307–312multiple regression,
block . . . . . . . . . . . . . . . . . . . . . 296–305categorical predictors . . . . . . . . . 298dummy variables . . . . . . . . . . . . . . 298hierarchical . . . . . . . . . . . . . . . 296–305indicator variables . . . . . . . . . . . . 298influential case . . . . . . . . . . . . . . . . 289nested . . . . . . . . . . . . . . . . . . . . 296–305outlier . . . . . . . . . . . . . . . . . . . . . . . . 289residual . . . . . . . . . . . . . . . . . . . . . . . 285weighted data . . . . . . . . . . . . . . . . . 294
mvdecode command . . . . . . . . 56, 67, 167
Nnaming variables . . . . . . . . . . . . . . . . . . . .25nested regression . . . . 296–305, 323–325,
360–362nestreg command . . 302–305, 323–325,
360–362NetCourses . . . . . . . . . . . . . . . . . . . . . . . . 525nolabel, list option. . . . . . . . . . . . . .222nominal-level variables . . . . . . . . . . . . . . 96nonlinear . . . . . . . . . . . . . . . . . . . . . . . . . . 336nonlinear regression . . . . . . . . . . . 313–325nonparametric ANOVA alternatives . . . .
. . . . . . . . . . . . . 234nonparametric tests . . . . . . . . . . . . . . . 182
Mann–Whitney . . . . . . . . . . . . . . . 182median . . . . . . . . . . . . . . . . . . . . . . . 183rank sum . . . . . . . . . . . . . . . . . . . . . 182
normally distributed residuals . . . . . 284numlabel command. . . . . . . . . . . . 82, 104
Oodds ratio . . . . . . . . . . . . . . . . . . . . 135, 338
interpretation . . . . . . . . . . . . . . . . . 347percentage change. . . . . . . . . . . . .347
OLS regression vs. logistic regression. . .. . . . . . . . . . . . . 337
Subject index 543
omega2 command . . . . . . . . . . . . . . . . . . 247one-sample t test . . . . . . . . . . . . . . . . . . 164one-parameter logistic IRT model. .484–
496one-way ANOVA . . . . . . . . . . . . . . . 219–220oneway option
bonferroni . . . . . . . . . . . . . . . . . . . 223scheffe . . . . . . . . . . . . . . . . . . . . . . 223sidak . . . . . . . . . . . . . . . . . . . . . . . . . 223
openexisting dataset . . . . . . . . . . . . . . 9–11Stata-installed dataset . . . . . . . . . 10
optifact command . . . . . . . . . . . . . . . 520option,
add, label define . . . . . . . . . . . . . . 2help, listcoef . . . . . . . . . . 348–350jitter(), scatter . . . . . . . . . . . 194percent, listcoef . . . . . . . . . . . 350
ordinal-level variables . . . . . . . . . . . . . . . 96outlier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Ppaired t test . . . . . . . . . . . . . . . . . . . . . . . 173panel data . . . . . . . . . . . . . . . . . . . . 452–453part correlation . . . . . . . . . . . . . . . . . . . . 279partial mediation . . . . . . . . . . . . . . . . . . 443pasting,. . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
reformatting . . . . . . . . . . . . . . . . . . . 88pasting results to word processor, . . . 88
formatting . . . . . . . . . . . . . . . . . . . . . 88path analysis . . . . . . . . . . . . . . . . . .442–446pcorr command . . . . . . . . . . . . . . 279, 300Pearson’s chi-squared . . . . . . . . . . . . . . 138percent, listcoef option . . . . . . . . . 350pie chart . . . . . . . . . . . . . . . . . . . . . . 104–108plot a confidence interval . . . . . . . . . . 211Poisson regression . . . . . . . . . . . . . . . . . 341postestimation . . . . . . . . . . . . . . . . 526–527postestimation command,
estat vif . . . . . . . . . . . . . . . 293–294margins . . . . . . . . . . . . . . . . . . . . . . 311marginsplot . . . . . . . . . . . . . 311–312predict . . . . . . . . . . . . . 289–291, 307test . . . . . . . . . . . . . . . . . . . . . 301–302
Postestimation Selector . . . . . . . 526–527
power analysis . . . . . . . . . . . . . . . . 174–182one-way ANOVA . . . . . . . . . . 232–234,
263–265repeated-measures ANOVA . . . 267–
269two means . . . . . . . . . . . . . . . .179–182two-way ANOVA . . . . . . . . . . 265–267
power command . . . . . . . . . . . . . . 178–182power oneway command . . . . . 232–234,
263–265power repeated command. . . .267–269power twomeans command. . . .181–182power twoway command . . . . . . 265–267powerreg command . . . . . . . . . . . 325–328predict command. . . . . . . . . . . . . . . . .473predict postestimation command. . . . .
. . . . . . . . 289–291, 307predict postregression . . . . . . . . . 289–291predictive validity . . . . . . . . . . . . . . . . . 384probability tables . . . . . . . . . . . . . . . . . . 129product term . . . . . . . . . . . . . . . . . . . . . . 309project outline . . . . . . . . . . . . . . . . . . . . . . 52prophecy formula . . . . . . . . . . . . . . . . . . 376proportions,
one-sample test . . . . . . . . . . . . . . . 157two-sample test . . . . . . . . . . . . . . . 159
prtest command . . . . . . . . . . . . . 157–163pseudo-R2 . . . . . . . . . . . . . . . . . . . . . . . . . 346pwcorr command . . . . . . . . . . . . . 205–207pweights . . . . . . . . . . . . . . . . . . . . . 295–296pwmean command . . . . . . . . . . . . . 227–229
Qquadratic model,
centering . . . . . . . . . . . . . . . . . 321–322examining . . . . . . . . . . . . . . . . 323–325fitting . . . . . . . . . . . . . . . . . . . . 315–321
qualifier,if with missing values . . . . . . . . . 79in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
RR2 . . . . . . . . . . . . . . . . . . . . . . . 170–171, 276
change . . . . . . . . . . . . . . . . . . . . . . . . 279random coefficients . . 454–456, 471–474
544 Subject index
random effects . . . . . . . . . . . . . . . . 454–456random intercept . . . . 454–456, 461–470random sample . . . . . . . . . . . . . . . . . . . . 191
how to draw . . . . . . . . . . . . . . . . . . 155random sampling . . . . . . . . . . . . . . . . . . 153random slope . . . . . . . . . . . . . . . . . 454–456randomization . . . . . . . . . . . . . . . . . . . . . 153
alternative to . . . . . . . . . . . . . . . . . 238how to perform . . . . . . . . . . . . . . . 155
ranksum command. . . . . . . . . . . . . . . . .182Rasch modeling. . . . . . . . . . . . . . . . . . . .482recode command. . . . . . . . . . .61–63, 297recoding . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
ranges . . . . . . . . . . . . . . . . . . . . . . . . . 61regress command . . 208–211, 275–276,
299–301, 307–309regression,
block . . . . . . . . . . . . . . . . . . . . . 296–305bootstrap . . . . . . . . . . . . . . . . . . . . . 283categorical predictors . . . . . . . . . 298dummy variables . . . . . . . . . . . . . . 298hierarchical . . . . . . . . . . . . . . . 296–305indicator variables . . . . . . . . . . . . 298influential case . . . . . . . . . . . . . . . . 289nested . . . . . . . . . . . . . . . . . . . . 296–305outlier . . . . . . . . . . . . . . . . . . . . . . . . 289residual . . . . . . . . . . . . . . . . . . . . . . . 285robust . . . . . . . . . . . . . . . . . . . . . . . . 283weighted data . . . . . . . . . . . . . . . . . 294
regression diagnostics . . . . . . . . . . . . . . 288regression line, plotting . . . . . . . . . . . . 196regression with interaction term . . 307–
312reliability,
alpha . . . . . . . . . . . . . . . . . . . . . . . . . 377equivalent forms . . . . . . . . . . . . . . 376IRT . . . . . . . . . . . . . . . . . . . . . . . 509–512kappa . . . . . . . . . . . . . . . . . . . . . . . . . 380kappa with three raters . . . . . . . 382Kuder–Richardson coefficient of re-
liability. . . . . . . . . . . . . . . . . . .379prophecy formula . . . . . . . . . . . . . 376split-half . . . . . . . . . . . . . . . . . . . . . . 376test–retest . . . . . . . . . . . . . . . . . . . . 375weighted kappa . . . . . . . . . . . . . . . 382
rename command . . . . . . . . . . . . . . 57, 256rename variable . . . . . . . . . . . . . . . . . . . 256repeated-measures ANOVA . . . . . . . . . 255repeated-measures design . . . . . 267–269repeated-measures t test . . . . . . . . . . . 173replace command . . . . . . . . . . . . . 65, 167reshape command . . . . . . . 256–258, 458reshape wide to long format . . . 256–258residual . . . . . . . . . . . . . . . . . . . . . . . 284, 285Results window . . . . . . . . . . . . . . . . . . . . . . 8
clear . . . . . . . . . . . . . . . . . . . . . . . . . . . 16more . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4scroll size . . . . . . . . . . . . . . . . . . . . . . . 4
reverse coding . . . . . . . . . . . . . . . . . . . . . 371reverse-code variables . . . . . . . . . . . . . . . 60Review window . . . . . . . . . . . . . . . . . . . . . . 8robust estimation of standard errors . . .
. . . . . . . . . . . . . 288robust regression . . . . . . . . . . . . . . . . . . 283root mean squared error . . . . . . . . . . . 210
Ssample, draw . . . . . . . . . . . . . . . . . . . . . . 191sample command . . . . . . . . . . . . . 145, 191SAS XPORT . . . . . . . . . . . . . . . . . . . . . . . . . 48save command . . . . . . . . . . . . . . . . . . 41–42saveold command. . . . . . . . . . . . . . . . . . 42scale construction. . . . . . . . . . . . . . . . . .370
reverse coding. . . . . . . . . . . . . . . . .371scale creation . . . . . . . . . . . . . . . . . . . . . . . 70scatter command . . . . . . . . . . . . 191–198scattergram . . . . . . . . . . . . . . . . . . . 190–201scattergram with confidence interval . .
. . . . . . . . . . . . . 211scattergram with jitter() option. .194scattergram, alternative . . . . . . . 197–201Scheffe, multiple comparison . . . . . . . 223schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15scientific notation. . . . . . . . . . . . . . . . . .278scree plot . . . . . . . . . . . . . . . . . . . . . 393–394S-curve . . . . . . . . . . . . . . . . . . . . . . . . . . . .336sdtest command . . . . . . . . . . . . . 171–172search command . . . . . . . . . . . . . . . 6, 520seed for starting a random sample. .191sem advantages . . . . . . . . . . . . . . . . . . . . 421
Subject index 545
SEM Builder . . . . . . . . . . . . . . . . . . 423–430restore default settings . . . . . . . . 431
sem command . . . . . . . . . . . . 421–449, 453sembuilder command . . . . . . . . . . . . . 423semipartial correlation . . . . . . . . 279, 300set more off command . . . . . . . . . . . . . 4set seed command . . . . . . 145, 154, 191
Sidak, multiple comparison . . . . . . . . 223significance,
statistical . . . . . . . . . . . . . . . . . . . . . 203substantive . . . . . . . . . . . . . . . . . . . 203
skewness . . . . . . . . . . . . . . . . . . 99, 113, 283sktest command . . . . . . . . . . . . . . . . . . 283slope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210SMCL . . . see Stata Markup and Control
Languagespearman command . . . . . . . . . . . . . . . 212Spearman’s rho . . . . . . . . . . . . . . . . . . . . 212split-half reliability . . . . . . . . . . . . . . . . 376SPSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48ssc command . . . . . . . . . . . . . . . . . . . . . 520standardized beta coefficient . . . . . . . 210standardized beta weights . . . . . . . . . 278standardized regression coefficients . . . .
. . . . . . . . . . . . . 278Stat/Transfer . . . . . . . . . . . . . . . . . . 48, 526Stata, limitations . . . . . . . . . . . . . . . . . . 526Stata Blog . . . . . . . . . . . . . . . . . . . . . . . . .521Stata bookstore . . . . . . . . . . . . . . . . . . . 522Stata code for textbook examples . . 520Stata/IC limitations . . . . . . . . . . . . . . . 526Stata Journal . . . . . . . . . . . . . . . . . . . . . . 522Stata Markup and Control Language . .
. . . . . . . . . . . . . 89Stata NetCourses . . . . . . . . . . . . . . . . . . 525Stata on Facebook . . . . . . . . . . . . . . . . . 521Stata on Twitter . . . . . . . . . . . . . . . . . . 521Stata Portal, UCLA . . . . . . .203, 520, 523Stata screen . . . . . . . . . . . . . . . . . . . . . . . . . 7Stata tutorial . . . . . . . . . . . . . . . . . . 18, 525Statalist Forum. . . . . . . . . . . . . . . . . . . .521statistical significance versus
substantive significance . . . 203structural equation modeling . . 421–449sum of squares. . . . . . . . . . . . . . . . . . . . .225
summarize command. .11–13, 113, 208,282
summarize(), tabulate option . . . 249–255
summary of data . . . . . . . . . . . . . . . . . . . 27sunflower command . . . . . . . . . . . . . . 193sysuse command . . . . . . . . . . . . . . . . . . . 10
Tt test,
one-sample . . . . . . . . . . . . . . . . . . . . 164power analysis . . . . . . . . . . . . 178–182two-sample. . . . . . . . . . . . . . . . . . . .166
tab command . . . . . . . . . . . . . . . . . . . . . 145tab1 command . . . . . . . . . . . . . . . 101, 204tab2 command . . . . . . . . . . . . . . . . . . . . 298tabdisp command. . . . . . . . . . . . . . . . .258tabi command. . . . . . . . . . . . . . . .140–141table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
probability . . . . . . . . . . . . . . . . . . . . 129summary statistics . . . . . . . . . . . . 235
table calculator . . . . . . . . . . . . . . . 140–141table command . . . . . . . . . . . . . . 142–143tabstat command . . . . . . . . . . . . 117, 235tabulate command . . . . . . . . . . . . . . . . 64,
68–70, 101, 124–128, 136, 138–140, 249–255
tau, measure of association . . . . . . . . 138test information function graph . . . 494,
501, 508test of significance,
kurtosis . . . . . . . . . . . . . . . . . . . . . . . 113skewness . . . . . . . . . . . . . . . . . . . . . . 113
test postestimation command. . . .301–302
test–retest reliability . . . . . . . . . . . . . . 375tests,
Bonferroni . . . . . . . . . . . . . . . . . . . . 207chi-squared . . . . . . . . . . . . . . . . . . . 127dependent t test . . . . . . . . . . . . . . 173likelihood-ratio chi-squared. . .353–
354likelihood-ratio chi-squared with
logistic regression . . . . . . . . . 353logistic regression . . . . . . . . . . . . . 353
546 Subject index
tests, continuedlong format for portions . . . . . . . 162Mann–Whitney . . . . . . . . . . . . . . . 182median . . . . . . . . . . . . . . . . . . . . . . . 183multiple comparison with correla-
tions . . . . . . . . . . . . . . . . . . . . . 207nonparametric . . . . . . . . . . . . . . . . 182one-sample t test . . . . . . . . . . . . . . 164paired t test . . . . . . . . . . . . . . . . . . 173proportions . . . . . . . . . . . . . . 157, 159rank sum . . . . . . . . . . . . . . . . . . . . . 182repeated-measures t test . . . . . . 173skewness and kurtosis . . . . . . . . . 283two-sample t test. . . . . . . . . . . . . .166unequal variances . . . . . . . . . . . . . 171Wald chi-squared test . . . . . . . . . 353wide format for proportions . . . 160z test for proportions . . . . . . . . . 163z test with logistic regression . .353
textbook examples using Statacommands . . . . . . . . . . . . . . . .520
three-parameter logistic IRT model . . . .. . . . . . . . . . . . . 487
time-invariant covariate . . . . . . . . . . . . 456time-varying covariate . . . . . . . . . . . . . 456tolerance . . . . . . . . . . . . . . . . . . . . . . 293–294toolbar,
Stata for Mac . . . . . . . . . . . . . . . . . . . 9Stata for Windows . . . . . . . . . . . . . . 9
ttest command. . . . . . . . . .164–170, 173tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Twitter . . . . . . . . . . see Stata on Twittertwo-by-two table. . . . . . . . . . . . . . . . . . .124two-parameter logistic IRT model. .486–
487, 496–501two-way ANOVA . . . . . . . . . . . . . . . 249–255twoway command . . . . . . . . 196–197, 308twoway lfit command . . . . . . . . . . . . 473
UUCLA Stata Portal . . . . . . . . 20, 203, 520
reshaping data wide to long . . . 256user-written commands . . . . . . . . . . . . 520
Vvalidity,
criterion related . . . . . . . . . . . . . . . 384external . . . . . . . . . . . . . . . . . . . . . . . 204predictive . . . . . . . . . . . . . . . . . . . . . 384
value labels . . . . . . . 23, 33–40, 57–60, 82variable labels . . . . . . . . . . . . . . . . . . . . . . 23variable name . . . . . . . . . . . . . . . . . . . 22, 25
reserved . . . . . . . . . . . . . . . . . . . . . . . . 22Variables Manager . . . . 34–40, 57–59, 73Variables window . . . . . . . . . . . . . . . . . . . . 8variance inflation factor . . . . . . . 293–294versions. . . . . . . . . . . . . . . . . . . . . . . . . . . . .42video tutorials . . . . . . . . . . . . . . . . . . . . . . 18VIF . . . . . . . . see variance inflation factor
WWald chi-squared test . . . . . . . . . . . . . .353web search . . . . . . . . . . . . . . . . . . . . . . . . 520weighted data . . . . . . . . . . . . . . . . . 294–296weighted kappa . . . . . . . . . . . . . . . . . . . . 382weights, pweights . . . . . . . . . . . . . 295–296wide format . . . . 160, 170, 221, 256–258,
457working directory . . . . . . . . . . . . . . . . . . . . 9
Xxtreg command . . . . . . . . . . . . . . . . . . . 262xtset command . . . . . . . . . . . . . . . . . . . 258
Zz test,
one-sample proportion . . . . . . . . 157two-sample proportion . . . . . . . . 159
zero-inflated models . . . . . . . . . . . . . . . 341