fit {gRc}R Documentation

Fit RCOX models

Description

This is a general function for fitting RCOX models (i.e. RCON and RCOR models) using different estimation algorithms.

Usage

## S3 method for class 'rcox':
fit(m, Kstart=m$Kstart, method = m$method, control = m$control,
details = m$details, trace = m$trace, returnModel = TRUE,...)

Arguments

m An RCOX model object (an object of class 'rcox')
Kstart An initial value for the concentration matrix.
method The specific estimation method. Can be either "scoring", (a modified Fisher scoring algorithm), "ipm" (iterative partial maximization), "matching" (score matching) or "user" (currently not used)
control A list controlling the fitting algorithms. See the 'details' section.
details The amount of details printed on the screen. 0 means no details at all.
trace Controls various diagnostics print outs. A debugging feature not intended for the user.
returnModel If TRUE the model object m is returned with fitting info added to it. If FALSE only the fitting info is returned.
... Additional arguments; currently not used.

Details

The fitted parameters etc. can be extracted using 'fitInfo(m)'.

The control argument is a list with named entries. Most important are the entries 'maxouter' and 'maxinner' (which both defaults to 25) for controlling the estimation algorithms. For other components please refer to the code.

Value

An RCOX model object.

Author(s)

Søren Højsgaard, sorenh@agrsci.dk

See Also

rcox, update.rcox

Examples


data(math)
gm  = ~al:an:st
vcc = list(~me+st, ~ve+an, ~al)
ecc = list(~me:ve+me:al, ~ve:al+al:st)

m1 <- rcox(gm=gm, vcc=vcc, ecc=ecc, data=math, fit=FALSE)

fit(m1, method="matching")
fit(m1, method="scoring")
fit(m1, method="ipm")

## MISSING

[Package gRc version 0.2.2 Index]