rsm.fit {marg}R Documentation

Fit a Regression-Scale Model Without Computing the Model Matrix

Description

Fits a rsm model without computing the model matrix of the response vector.

Usage

rsm.fit(X, Y, offset, family, dispersion, score.dispersion, maxit, epsilon, 
        trace, ...)

Arguments

X

the model matrix (design matrix).

Y

the response vector.

dispersion

if NULL, the MLE of the scale parameter is returned, otherwise the scale parameter is fixed to the numerical value passed through the argument. If Huber's least favourable distribution is used and dispersion is TRUE, the MAD is computed and the scale parameter fixed to this value in subsequent calculations.

score.dispersion

must default to NULL.

offset

optional offset added to the linear predictor.

family

a family.rsm object, i.e. a list of functions and expressions characterizing the error distribution. Families supported are gaussian, student (Student's t), extreme (Gumbel or extreme value), logistic, logWeibull, logExponential, logRayleigh and Huber (Huber's least favourable). Users can construct their own families, as long as they have components compatible with those given in rsm.distributions. The demonstration file ‘margdemo.R’ that ships with the package shows how to create a new generator function.

maxit

maximum number of iterations allowed.

epsilon

convergence threshold.

trace

if TRUE, iterations details are printed during execution.

...

not used, but do absorb any redundant argument.

Details

The rsm.fit function is called internally by the rsm routine to do the actual model fitting. Although it is not intended to be used directly by the user, it may be useful when the same data frame is used over and over again. It might save computational time, since the model matrix is not created. No formula needs to be specified as an argument. As no weights argument is available, the response Y and the model matrix X must already include the weights if weighting is desired.

Value

an object which is a subset of a rsm object.

Note

The rsm.fit function is the workhorse of the rsm fitting routine for the student (with df \leq 2), Huber and user-defined error distributions. It receives X and Y data rather than a formula, but still uses the family.rsm object to define the IRLS steps. Users can write their own versions of rsm.fit, and pass the name of their function via the method argument to rsm. Care should be taken to include as many of the arguments as feasible, but definitely the ... argument, which will absorb any additional argument given in the call from rsm.

See Also

rsm, rsm.surv, rsm.null, rsm.object, rsm.families


[Package marg version 1.2-2.1 Index]