llbtPC.fit(obj, nitems, formel = ~1, elim = ~1, resptype = "paircomp",
obj.names = NULL, undec = TRUE)formel is not ~1 then
elim will be set to the highest interaction between all terms
contained in"paircomp" by default and is reserved for future usage.
Any other specification will not change the behaviour of llbtPC.fitundec = TRUE.llbtPC.fit returns an object of class llbtMod. This object
is basically a gnm object with an additional element envList.
This is a list with further details like the subject covariates
design structure covdesmat, the model specification (formel
and elim), the object names (obj.names), the number of
items (nobj) and comparisons (ncomp), etc.
The function llbt.worth can be used to
produce a matrix of estimated worth parameters.obj are supplied using either a data frame
or a datafile in which case obj is a path/filename. The input
data file if specified must be a plain text file with variable names in
the first row as readable via the command read.table(datafilename,
header = TRUE).
For an example see cemspc.formel and elim arguments. formel specifies the
actual model to be fitted. For instance, if specified as
formel=~SEX different preference scale for the objects will be
estimated for males and females. For two or more covariates,
the operators + or * can be used to model main or interaction
effects, respectively. The operator : is not allowed. See also
formula.
The specification for elim follows the same rules as for
formel. However, elim specifies the basic contingency
table to be set up but does not specify any covariates to be fitted.
This is done using formel.
If, e.g., elim=~SEX but formel=~1,
then the table is set up as if SEX would be fitted but only one global
preference scale is computed. This feature
allows for the successive fitting of nested models to enable the use of
deviance differences for model selection (see example below).llbt.design, pattL.fit# cems universities example
res0 <- llbtPC.fit(cemspc, nitems = 6, formel = ~1, elim = ~ENG, undec = TRUE)
res1 <- llbtPC.fit(cemspc, nitems = 6, formel = ~ENG, elim = ~ENG, undec = TRUE)
anova(res1, res0)
llbt.worth(res1)Run the code above in your browser using DataLab