Description Usage Format Source References Examples
Each subject provided ordinal responses on three items concerning their opinion on early teens (age 14-16) having sex before marriage (Item1), a man and a woman having sex before marriage (Item2), and a married person having sex with someone other than their spouse (Item3). Data are provided as frequencies by response pattern.
1 |
A data frame with 105 observations on the following 6 variables.
IDa numeric vector indicating unique patient identifier
SexItemsordinal item response coded as 1 = always wrong; 2 = almost always wrong; 3 = wrong only sometimes; 4 = not wrong
inta numeric vector of ones; used in the stand-alone MIXOR program to indicate the intercept
Item2vs1attitude towards premarital vs teenage sex
Item3vs1attitude towards extramarital vs teenage sex
freqfrequency weight of the pattern
Agresti A. and Lang J.B. (1993) A proportional odds model with subject-specific effects for repeated ordered categorical responses, Biometrika 80, 527-534.
Hedeker D. and Mermelstein R.J. (1998) A multilevel thresholds of change model for analysis of stages of change data, Multivariate Behavioral Research 33, 427-455.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library("mixor")
data("norcag")
# random intercepts model assuming proportional odds for differences in item responses
Fitted.norcag<-mixor(SexItems~Item2vs1+Item3vs1, data=norcag, id=ID,
weights=freq, link="logit", nAGQ=20)
summary(Fitted.norcag)
# random intercepts model assuming non-proportional odds for differences in item responses
Fitted.norcag.np<-mixor(SexItems~Item2vs1+Item3vs1, data=norcag, id=ID,
weights=freq, link="logit", nAGQ=10, KG=2)
summary(Fitted.norcag.np)
# SCALING model
Fitted.norcag.scale<-mixor(SexItems~Item2vs1+Item3vs1, data=norcag, id=ID,
weights=freq, link="logit", nAGQ=10, KS=2)
summary(Fitted.norcag.scale)
|
Loading required package: survival
Warning message:
In model.matrix.default(mt, mf, contrasts) :
non-list contrasts argument ignored
Call:
mixor(formula = SexItems ~ Item2vs1 + Item3vs1, data = norcag,
id = ID, weights = freq, nAGQ = 20, link = "logit")
Deviance = 2436.854
Log-likelihood = -1218.427
RIDGEMAX = 0.1
AIC = -1224.427
SBC = -1236.917
Estimate Std. Error z value P(>|z|)
(Intercept) -2.081101 0.202849 -10.2594 < 2.2e-16 ***
Item2vs1 3.807599 0.268844 14.1628 < 2.2e-16 ***
Item3vs1 -0.570918 0.197825 -2.8860 0.003902 **
Random.(Intercept) 5.139592 0.959090 5.3588 8.377e-08 ***
Threshold2 1.134229 0.098389 11.5280 < 2.2e-16 ***
Threshold3 2.783234 0.186590 14.9163 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Warning message:
In model.matrix.default(mt, mf, contrasts) :
non-list contrasts argument ignored
Call:
mixor(formula = SexItems ~ Item2vs1 + Item3vs1, data = norcag,
id = ID, weights = freq, nAGQ = 10, link = "logit", KG = 2)
Deviance = 2401.609
Log-likelihood = -1200.805
RIDGEMAX = 0.1
AIC = -1210.805
SBC = -1231.621
Estimate Std. Error z value P(>|z|)
(Intercept) -1.81905 0.19270 -9.4398 < 2.2e-16 ***
Item2vs1 3.15542 0.26733 11.8035 < 2.2e-16 ***
Item3vs1 -0.59966 0.19905 -3.0125 0.002591 **
Random.(Intercept) 4.40011 0.80989 5.4329 5.543e-08 ***
Threshold2 1.59227 0.18510 8.6020 < 2.2e-16 ***
Threshold3 3.21192 0.33989 9.4499 < 2.2e-16 ***
Threshold2Item2vs1 0.96062 0.20618 4.6591 3.176e-06 ***
Threshold3Item2vs1 1.06468 0.36491 2.9176 0.003527 **
Threshold2Item3vs1 0.26318 0.26612 0.9889 0.322690
Threshold3Item3vs1 -0.61730 0.65391 -0.9440 0.345168
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Warning message:
In model.matrix.default(mt, mf, contrasts) :
non-list contrasts argument ignored
Call:
mixor(formula = SexItems ~ Item2vs1 + Item3vs1, data = norcag,
id = ID, weights = freq, nAGQ = 10, link = "logit", KS = 2)
Deviance = 2418.607
Log-likelihood = -1209.303
RIDGEMAX = 0.2
AIC = -1217.303
SBC = -1233.957
Estimate Std. Error z value P(>|z|)
(Intercept) -2.22116 0.33600 -6.6107 3.826e-11 ***
Item2vs1 4.50668 0.69147 6.5175 7.149e-11 ***
Item3vs1 -0.62054 0.36986 -1.6778 0.093394 .
Scale.Item2vs1 0.63125 0.19665 3.2100 0.001328 **
Scale.Item3vs1 -0.01540 0.31656 -0.0486 0.961200
Random.(Intercept) 6.78761 2.47036 2.7476 0.006003 **
Threshold2 1.39174 0.23492 5.9242 3.138e-09 ***
Threshold3 3.61363 0.57930 6.2379 4.435e-10 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.