tlm {hett} | R Documentation |
Maximum likelihood estimation for heteroscedastic t regression
Description
Fits a heteroscedastic t regression to given data for known and unknown degrees of freedom.
Usage
tlm(lform, sform = ~ 1, data = NULL, subset = NULL, contrasts =
NULL, na.action = na.fail, start = NULL, control = tlm.control(...),
obs = FALSE, estDof = FALSE, ... )
## S3 method for class 'tlm'
print(x, ...)
Arguments
x |
an object of class " |
lform |
a formula of the type |
sform |
a formula of the type |
data |
the data in the form of a |
subset |
numerical vector to subset the |
contrasts |
set of contrasts for the location model (see |
na.action |
the action to proceed with in the event of |
start |
is a list of possibly four named components, (" |
control |
is an argument to a function that maintains the control of the
algorithm. The |
obs |
should the location parameters be calculated using the observed or
expected information(default = |
estDof |
should the degrees of freedom parameter be estimated or not. If |
... |
arguments passed to |
Details
When the degrees of freedom is unknown the code uses the non-linear optimiser
nlm
. If the response (and therefore the errors) is tending toward
a Gaussian this optimisation will still converge but with with very high degrees of freedom.
To obtain the appropriate standard errors from summary
the user
must specify the argument obs = F
to ensure that the location
parameter is calculated using the expected information.
Value
a list containing the following components:
loc.fit |
an object containing the estimated location parameters and other elements associated with the location parameter model |
scale.fit |
an object containing the estimated scale parameters and other elements associated with the scale parameter model |
random |
the random scale effects |
dof |
fixed or estimated degrees of freedom |
dofse |
the standard error associated with the degrees of freedom |
iter |
the number of iterations of the algorithm |
logLik |
the maximised log-likelihood |
endTime |
the time taken for the algorithm to converge |
Background
The theoretical background for this function can be found in Taylor and Verbyla (2004).
Author(s)
Julian Taylor
References
Taylor, J. D. & Verbyla, A. P (2004). Joint modelling of the location and scale parameters of the t-distribution. Statistical Modelling 4, 91-112.
See Also
Examples
data(mm, package = "hett")
attach(mm)
## fit a model with no heteroscedasticity and fixed degrees of freedom
tfit <- tlm(m.marietta ~ CRSP, data = mm, start = list(dof = 3))
## fit a model with heteroscedasticity and fixed degrees of freedom
tfit1 <- tlm(m.marietta ~ CRSP, ~ CRSP, data = mm, start = list(dof = 3))
## fit a model with heteroscedasticity and estimating the degrees of freedom
tfit2 <- tlm(m.marietta ~ CRSP, ~ CRSP, data = mm,
start = list(dof = 3), estDof = TRUE)