View source: R/extract3logit.R
extract3logit | R Documentation |
extract3logit()
extracts all information which is relevant for
computing the vector field(s) from the object passed to argument x
. See
Details for information on how new S3
methods of generic
extract3logit()
should be implemented.
extract3logit(x, ...) ## Default S3 method: extract3logit(x, ...) ## S3 method for class 'clm' extract3logit(x, ...) ## S3 method for class 'clm2' extract3logit(x, ...) ## S3 method for class 'mlogit' extract3logit(x, ...) ## S3 method for class 'model3logit' extract3logit(x, ...) ## S3 method for class 'multinom' extract3logit(x, ...) ## S3 method for class 'polr' extract3logit(x, ...) ## S3 method for class 'vgam' extract3logit(x, ...) ## S3 method for class 'vglm' extract3logit(x, ...)
x |
an object of any of the classes listed above. If instead, a list is passed, it should be structured as described in section Details. |
... |
other arguments passed to other methods. |
When a specific method is not available for a fitted model, it is possible to
pass a list to argument x
. In that case, the list should consists of the
following components (the order is irrelevant):
levels
: vector of possible values of the dependent variable. It should
be a character vector of lenght three, whose first element is interpreted
as the reference level, whereas the second and the third elements are
associated to the first and second columns of matrix B
respectively.
B
: matrix of regression coefficients. It should be a numeric matrix
(or any coercible object) with two columns if the model is cardinal, with
only one column if the model is ordinal. The number of rows should be equal
to the number of covariates and the names of covariates should be added as
row names. The intercepts should be included only in case of categorical
models, whereas column names, if provided, are ignored.
alpha
: intercepts of ordinal models. It should be a numerical vector of
length two if the model is ordinal, otherwise this component should be
either set to NULL
or missing.
vcovB
: covariance matrix of regression coefficients. It should be a
numeric matrix (or any coercible object) where the number of rows and
columns equals the number of elements of B
. Rows and columns should
be ordered according to the labels of the dependent variable (slower
index), and then to the covariates (faster index).
If a new S3
method for generic extract3logit()
has to be implemented, the
following components may be set:
readfrom
: character with information about the function that returned the
estimates in the form package::function
(for example nnet::multinom
,
MASS::polr
, ...)
In any case, once the list has been created, the new method should invoke
the default method extract3logit.default()
and return its ouput. By so
doing, automatic checks and initialisations are run before the model3logit
object is returned.
An object of class model3logit
.
plot3logit-package
, field3logit()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.