Description Usage Arguments Details Value Background Author(s) References See Also Examples
Fits a heteroscedastic t regression to given data for known and unknown degrees of freedom.
1 2 3 4 5 6 |
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 |
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.
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 |
The theoretical background for this function can be found in Taylor and Verbyla (2004).
Julian Taylor
Taylor, J. D. & Verbyla, A. P (2004). Joint modelling of the location and scale parameters of the t-distribution. Statistical Modelling 4, 91-112.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.