Description Usage Arguments Details Value Examples
Creates an 'lmvar'-like object without carrying out a model fit. This object is a 'lmvar' object from which all members
have been left out
that are the result of the fit. Such an object can be used in functions which typically use an 'lmvar' object as input but do not
need the fit results. Since no fit is performed, lmvar_no_fit is convenient when the fit is time-consuming or, e.g.,
does not converge.
1 2 3 |
y |
Vector of observations |
X_mu |
Model matrix for the expected values μ |
X_sigma |
Model matrix for the logarithms of the standard deviations σ |
intercept_mu |
see the function |
intercept_sigma |
see the function |
sigma_min |
see the function |
slvr_options |
see the function |
control |
see the function |
... |
Additional arguments, not used in the current implementation |
See lmvar for the requirements and a further explanation of all the arguments.
The class 'lmvar' is an extension of the class 'lmvar_no_fit'. This means that each object which is of class 'lmvar', is of class 'lmvar_no_fit' as well. Wherever an object of class 'lmvar_no_fit' is required, an object of class 'lmvar' can be used as well.
Accessor and utility functions for a 'lmvar_no_fit' object are: nobs.lmvar_no_fit, alias.lmvar_no_fit
and dfree
The function lmvar_no_fit is especially useful in combination with fwbw.lmvar_no_fit. In case a
model with many degrees of freedom does not converge with lmvar, one can create an 'lmvar_no_fit' object. This
is used as
input for fwbw with the argument fw = TRUE. The fwbw algorithm will try to select an optimal subset of all
degrees of freedom, starting with the smallest subset possible.
Although lmvar_no_fit does not carry out a model fit, it will do the following:
add an intercept term to the model matrices (unless intercept_mu is FALSE and/or
intercept_sigma is FALSE), and
make the model matrices full rank.
An object of class 'lmvar_no_fit', which is a list. The list-members are the same as for an object of call 'lmvar', but with members that are the result of the model fit left out.
Users are discouraged to access list-members directly. Instead, list-members are to be accessed with the various accessor and utility functions in the package. Exceptions are the following list members for which no accessor functions exist:
call the function call
y the vector of observations
X_mu the model matrix for μ. In general, it differs from the user-supplied X_mu because
lmvar_no_fit adds an intercept-column (unless intercept_mu is FALSE) and makes the matrix full-rank.
X_sigma the model matrix for \log σ. In general, it differs from the user-supplied
X_sigma because lmvar_no_fit adds an intercept-column (unless intercept_sigma is FALSE) and makes
the matrix full-rank.
intercept_mu boolean which tells whether or not an intercept column (Intercept) has been added to the
model matrix X_μ
intercept_sigma boolean which tells whether or not an intercept column (Intercept_s) has been added to the
model matrix X_σ
sigma_min the value of the argument sigma_min in the call of lmvar_no_fit
slvr_options the value of the argument slvr_options in the call of lmvar_no_fit
control the value of the argument control in the call of lmvar_no_fit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # As example we sue the dataset 'iris' from the library 'datasets'
library(datasets)
# Create the model matrix for both the expected values and the standard deviations
X = model.matrix( ~ Species - 1, data = iris)
# Take as response variabe the variable Sepal.length
y = iris$Sepal.Length
# Construct a 'lmvar_no_fit' object
no_fit = lmvar_no_fit( y, X, X)
# The following functions all work on such an object
nobs(no_fit)
dfree(no_fit)
alias(no_fit)
# You can also supply 'lmvar' arguments
no_fit = lmvar_no_fit( y, X[,-1], X[,-1], intercept_mu = FALSE, intercept_sigma = FALSE)
dfree(no_fit)
# Some (most) arguments have no effect except that they are stored in the 'lmvar_no_fit'
# object
no_fit = lmvar_no_fit( y, X, X, control = list( slvr_log = TRUE, remove_df_sigma = TRUE))
no_fit$control
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.