tlm: Maximum likelihood estimation for heteroscedastic t...

Description Usage Arguments Details Value Background Author(s) References See Also Examples

Description

Fits a heteroscedastic t regression to given data for known and unknown degrees of freedom.

Usage

1
2
3
4
5
6
tlm(lform, sform =  ~ 1, data = sys.parent(), 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 "tlm"

lform

a formula of the type response ~ terms, where terms can be of the form, for example, first + second or first*second(see lm for details)

sform

a formula of the type ~ terms, where terms can be of the form, for example, first + second or first*second(see lm for details).

data

the data in the form of a data.frame where the column names can be matched to the variable names supplied in lform and sform

subset

numerical vector to subset the data argument

contrasts

set of contrasts for the location model (see contrasts.arg for details)

na.action

the action to proceed with in the event of NA's in the response. Currently NA's are not allowed and therefore na.fail is the sole argument.

start

is a list of possibly four named components, ("beta", "lambda", "dof", "omega"), for the location, scale, degrees of freedom parameters and random scale effects respectively. Each component must be of the appropriate length.

control

is an argument to a function that maintains the control of the algorithm. The tlm.control()function contains the arguments, epsilon to determine how small the relative difference of likelihoods should be for convergence (default is 1e-07), maxit to determine the maximum iterations required (default = 50), trace if the user requires printing of estimates etc. as algorithm runs (default = FALSE), verboseLev to determine the amount of verbose printing to the screen as the algorithm runs (verboseLev = 1 displays location scale and dof estimates and the likelihood, verboseLev = 2 displays all of 1 plus the random scale effects)

obs

should the location parameters be calculated using the observed or expected information(default = FALSE). (Note: using the observed information does not calculate the appropriate standard errors, see DETAILS)

estDof

should the degrees of freedom parameter be estimated or not. If FALSE then the value given for dof in the start argument will be the fixed value used for the algorithm. If TRUE then the value given for dof in the start argument supplies an initial value only.

...

arguments passed to tlm.control() or to the print method

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

summary.tlm

Examples

 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)

hett documentation built on June 12, 2018, 5:19 p.m.