simex                 package:simex                 R Documentation

_S_i_m_u_l_a_t_i_o_n _E_x_t_r_a_p_o_l_a_t_i_o_n

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

     Implementation of the SIMEX Algorithm for measurement error models
     according to Cook and Stefanski

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

     simex(model
             , SIMEXvariable
             , measurement.error
             , lambda = c(0.5,1,1.5,2)
             , B = 100, fitting.method = "quadratic"
             , jackknife.estimation = "quad"
             , asymptotic = TRUE)

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

   model: the naive model

SIMEXvariable: character or vector of characters containing the names
          of the variables with measurement error

measurement.error: vector of standard deviations of the known
          measurement errors

  lambda: vector of lambdas for which the simulation step should be
          done (without 0)

       B: number of iterations for each lambda

fitting.method: fitting method 'linear','quadratic','nonlinear' are
          implemented. (first 4 letters are enough)

jackknife.estimation: specifying the extrapolation method for jackknife
          variance estimation. Can be set to FALSE if it should not be
          performed

asymptotic: logical, indicating if asymptotic variance estimation
          should be done, in the Naive model the option 'x = TRUE' have
          to be set.

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

     nonlinear is implemented as described in Cook and Stefanski, but
     is numerically not stable. It is not advisable to use this
     feature. See 'fit.nls' for details. If a nonlinear extrapolation
     is desired please use the 'refit' function.

     Asymptotic is only implemented for naive models of class 'lm' or
     'glm'

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

     Returns an object of class SIMEX which contains: 

coefficients: the corrected coefficients of the SIMEX model,

SIMEX.estimates: the estimates for every lambda,

   model: the naive model,

measurement.error: the known error variances,

       B: the number of iterations,

extrapolation: the model object of the extrapolation step,

fitting.method: the fitting method of the extrapolation step,

residuals: residuals,

fitted.values: fitted values,

    call: the function call,

variance.jackknife: the jackknife variance estimate,

extrapolation.variance: the model object of the variance extrapolation,

variance.jackknife.lambda: the data set for the extrapolation

variance.asymptotic: the asymptotic variance estimates

   theta: estimates for every B and lambda

     ...

_A_u_t_h_o_r(_s):

     Wolfgang Lederer,wolfgang.lederer@googlemail.com

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

     Cook, J.R. and Stefanski, L.A. (1994) Simulation-Extrapolation
     Estimation in Parametric Measurement error Models. _Journal of
     American Statistical Assosiaction_, *89*, 1314 - 1328

     Carroll, R.J., Kchenhoff,H., Lombard,F. and Stefanski L.A. (1996)
     Asymptotics for the SIMEX Estimator in Nonlinear Measurement Error
     Models. _Journal of the American Statistical Association_, *91*,
     242 - 250

     Carrol, R.J., Ruppert, D. and Stefanski L.A. (1995). _Measurement
     Error in Nonlinear Models._ London: Chapman and Hall.

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

     'mcsimex' for discreete data with misclassification, 'lm','glm',
     'refit'

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

     # to test nonlinear extrapolation set.seed(3)
     x <- rnorm(200,0,100)
     u <- rnorm(200,0,25)
     w <- x+u
     y <- x +rnorm(200,0,9)
     true.model <- lm(y~x) # True model
     naive.model <- lm(y~w, x=TRUE)
     simex.model <- simex(model = naive.model
             , SIMEXvariable = "w"
             , measurement.error= 25)
     plot(x,y)
     abline(true.model,col="darkblue")
     abline(simex.model,col ="red")
     abline(naive.model,col = "green")
     legend(min(x),max(y),legend=c("True Model","SIMEX model","Naive Model")
             , col = c("darkblue","red","green"),lty=1)

     plot(simex.model, mfrow = c(2,2))

