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

