# NOT RUN {
## Goodman (1991), Table 17.1 (p. 1097)
data(criminal)
model <- rc(criminal)
model$assoc # These are the phi (.07), mu and nu
model$assoc$row[,1,1] * model$assoc$phi[1,1] # These are the mu'
model$assoc$col[,1,1] * model$assoc$phi[1,1] # These are the nu'
## Becker & Clogg (1989), Table 5 (p. 145)
# See also ?rcL to run all models in one call
# }
# NOT RUN {
data(color)
# "Uniform weights" in the authors' terms mean "no weighting" for us
# See ?rcL for average marginals
caithness.unweighted <- rc(color[,,1], nd=2, weighting="none",
se="jackknife")
caithness.marginal <- rc(color[,,1], nd=2, weighting="marginal",
se="jackknife")
aberdeen.unweighted <- rc(color[,,2], nd=2, weighting="none",
se="jackknife")
aberdeen.marginal <- rc(color[,,2], nd=2, weighting="marginal",
se="jackknife")
caithness.unweighted
caithness.marginal
aberdeen.unweighted
aberdeen.marginal
# To see standard errors, either:
se(caithness.unweighted)
# and so on...
# (ours are much smaller for the marginal-weighted case)
# Or:
summary(caithness.unweighted)
# }
# NOT RUN {
## Clogg & Shihadeh (1994), Tables 3.5a and b (p. 55-61)
data(gss88)
model <- rc(gss88)
# Unweighted scores
summary(model, weighting="none")
# Marginally weighted scores
summary(model, weighting="marginal")
# Uniformly weighted scores
summary(model, weighting="uniform")
## Wong (2010), Table 2.7 (p. 48-49)
# }
# NOT RUN {
data(gss8590)
# The table used in Wong (2001) is not perfectly consistent
# with that of Wong (2010)
tab <- margin.table(gss8590[,,c(2,4)], 1:2)
tab[2,4] <- 49
model <- rc(tab, nd=2, weighting="none", se="jackknife")
model
summary(model) # Jackknife standard errors are slightly different
# from their asymptotic counterparts
# Compare with bootstrap standard errors
model2 <- rc(tab, nd=2, weighting="none", se="bootstrap")
plot(model, conf.int=0.95)
summary(model2)
# }
Run the code above in your browser using DataLab