| clm.fit {ordinal} | R Documentation |
A direct fitter of cumulative link models.
clm.fit(y, X, S, N, weights = rep(1, nrow(X)),
offset = rep(0, nrow(X)), S.offset = rep(0, nrow(X)),
control = list(), start,
link = c("logit", "probit", "cloglog", "loglog", "cauchit"),
threshold = c("flexible", "symmetric", "symmetric2", "equidistant"))
y |
the response variable; a factor, preferably and ordered factor. |
X, S, N |
optional design matrices for the regression parameters, scale parameters and nominal parameters respectively. |
weights |
optional case weights. |
offset |
an optional offset. |
S.offset |
an optional offset for the scale part of the model. |
control |
a list of control parameters, optionally a call to
|
start |
an optional list of starting values of the form
|
link |
the link function. |
threshold |
the threshold structure, see further at
|
This function does almost the same thing that clm does:
it fits a cumulative link model. The main differences are that
clm.fit does not setup design matrices from formulae and only
does minimal post processing after parameter estimation.
Compared to clm, clm.fit does little to warn the
user of any problems with data or model. However, clm.fit will
attempt to identify column rank defecient designs. Any unidentified
parameters are indicated in the aliased component of the fit.
In contrast to clm, clm.fit allows non-positive
weights.
A list with the following components:
par |
the maximum likelihood estimate of the model parameters on
the form |
gradient |
gradient of the log-likelihood function for the parameters at the optimum. |
Hessian |
the Hessian of the parameters at the optimum. |
logLik |
the value of the log-likelihood function at the optimum. |
convergence |
a convergence code; 1: successful convergence, 2: iteration limit reached, 3: step factor reduced below minimum. |
message |
convergence message. |
maxGradient |
the maximum absolute gradient:
|
niter |
depends on the optimizer. For the default Newton optimizer it is a vector of length 2: the number of iteration and the number of step halvings respectively. |
fitted |
the fitted values (probabilities). |
coef.names |
a list of vectors of names of the coefficients as inferred from the column names of the design matrices. |
aliased |
a list of logical vectors; |
Rune Haubo B Christensen
## A simple example: fm1 <- clm(rating ~ contact + temp, data=wine) summary(fm1) ## get the model frame containing y and X: mf1 <- update(fm1, method="model.frame") clm.fit(mf1$y, mf1$X)