chopit(formula, data, subset, options=anchors.options(), na.action = na.omit)
subset
. chopit(formula, data)
is equivalent to, chopit(formula, data, options = anchors.options( normalize ="self", vign.var = "hetero", linear = TRUE, analytical= TRUE, optimizer= "optim"))To change an option setting, pass one or more of the following tagged values to the options argument via the
anchors.options()
function. Alternative vluaes for options are passed using the
tag=new.value syntax (same with the par()
function. To see all default values, type anchors.options()
without arguments. optim
is invoked.
genoud
is invoked.
The formula syntax is designed to allow the same list of formulas
to be used for both anchors and chopit.
If a user would like to use exactly the same cases with
chopit
as with anchors
(i.e., drop cases with any
missing responses or missing cpolr
values), and vise versa (i.e.,
also drop any case with missing values in the tau=
,
tau1=
formulae), then the user should use the same list of
formula for all methods and use the option
anchors.options(delete="maximal")
. See example below.
Only options relevant to chopit
are discussed here.
The named list() of formulas may include
self: self-response variable and linear predictors.
vign: vignette responses, bound together by cbind (as in glm binomial syntax), with ONLY '~ 1' as RHS of equation (formulas must have RHS). Must be present for all methods.
tau : linear predictors of cutpoints, NO LHS variable.
tau1 : Optional. linear predictors of only the mean shift of all cutpoints NO LHS variable. Default: if omitted, set equal to formula specified in 'tau='. Example:
fo <- list(self = xsayself ~ age, vign = cbind(xsay3,xsay1) ~ 1, tau = ~ age + china, tau1 = ~ age + china + male )
One can also use a single formula as a short hand: specifying
fo <- self ~ vign1 + vign2
is equivalent to
fo <- list(self = self ~ 1 vign = cbind(vign1,vign2) ~ 1, tau = ~ 1, tau1 = ~ 1, cpolr= ~ 1)All of the response variables must be in the form of consequetive non-negative numeric integers, i.e., 1, 2, ... K. **
anchors
currently does not support factor responses.** The chopit
model does *not* by default require that every
respondent answer all vignette or the self questions to be included in
the model; only answers that are non-missing are used in the
likelihood function.
Wand, Jonathan and Gary King. (2007) Anchoring Vignetttes in R: A (different kind of) Vignette copy at http://wand.stanford.edu/anchors/doc/anchors.pdf
King, Gary; Christopher J.L. Murray; Joshua A. Salomon; and Ajay Tandon. "Enhancing the Validity and Cross-cultural Comparability of Survey Research," American Political Science Review, Vol. 98, No. 1 (February, 2004): 191-207, copy at http://gking.harvard.edu/files/abs/vign-abs.shtml
anchors
,
anchors.data
,
anchors.options
,
optim
,
genoud
##
data(mexchn)
fo <- list(self = xsayself ~ 1,
vign = xsay3 ~ 1,
tau = ~1 )
out1 <- chopit( fo, mexchn)
summary(out1)
Run the code above in your browser using DataLab