tlm                   package:hett                   R Documentation

_M_a_x_i_m_u_m _l_i_k_e_l_i_h_o_o_d _e_s_t_i_m_a_t_i_o_n _f_o_r _h_e_t_e_r_o_s_c_e_d_a_s_t_i_c _t _r_e_g_r_e_s_s_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     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, ...)

_A_r_g_u_m_e_n_t_s:

       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 \code{print}
          method' 

_D_e_t_a_i_l_s:

     When the degrees of freedom is unknown the code uses the
     non-linear optimiser 'nlm'. If the data is tending toward the
     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 component.

_V_a_l_u_e:

     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 

_B_a_c_k_g_r_o_u_n_d:

     The theoretical background for this function can be found in
     Taylor and Verbyla (2004)

_R_e_f_e_r_e_n_c_e_s:

     Taylor, J. D. & Verbyla, A. P (2004). Joint modelling of the
     location and scale parameters of the _t_-distribution.
     _Statistical Modelling_ *4*, to appear.

_S_e_e _A_l_s_o:

     'summary.tlm'

_E_x_a_m_p_l_e_s:

     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) 

