logtrans                package:MASS                R Documentation

_E_s_t_i_m_a_t_e _l_o_g _T_r_a_n_s_f_o_r_m_a_t_i_o_n _P_a_r_a_m_e_t_e_r

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

     Find and optionally plot the marginal (profile) likelihood for
     alpha for a transformation model of the form 'log(y + alpha) ~ x1
     + x2 + ...'.

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

     logtrans(object, ...)

     ## Default S3 method:
     logtrans(object, ..., alpha = seq(0.5, 6, by = 0.25) - min(y),
              plotit = TRUE, interp =, xlab = "alpha", ylab = "log Likelihood")

     ## S3 method for class 'formula':
     logtrans(object, data, ...)

     ## S3 method for class 'lm':
     logtrans(object, ...)

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

  object: Fitted linear model object, or formula defining the
          untransformed model that is 'y ~ x1 + x2 + ...'.  The
          function is generic. 

     ...: If 'object' is a formula, this argument may specify a data
          frame as for 'lm'. 

   alpha: Set of values for the transformation parameter, alpha. 

  plotit: Should plotting be done? 

  interp: Should the marginal log-likelihood be interpolated with a
          spline approximation?   (Default is 'TRUE' if plotting is to
          be done and the number of real points is less than 100.) 

    xlab: as for 'plot'. 

    ylab: as for 'plot'. 

    data: optional 'data' argument for 'lm' fit. 

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

     List with components 'x' (for alpha) and 'y' (for the marginal
     log-likelihood values).

_S_i_d_e _E_f_f_e_c_t_s:

     A plot of the marginal log-likelihood is produced, if requested,
     together with an approximate mle and 95% confidence interval.

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

     Venables, W. N. and Ripley, B. D. (2002) _Modern Applied
     Statistics with S._ Fourth edition.  Springer.

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

     'boxcox'

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

     logtrans(Days ~ Age*Sex*Eth*Lrn, data = quine,
              alpha = seq(0.75, 6.5, len=20))

