Learn R Programming

lavaSearch2 (version 1.4)

sCorrect: Satterthwaite Correction and Small Sample Correction

Description

Correct the bias of the ML estimate of the variance and compute the first derivative of the information matrix.

Usage

sCorrect(object, adjust.Omega, adjust.n, score, df, numeric.derivative,
  param, data, tol, n.iter, trace, ...)

# S3 method for lm sCorrect(object, adjust.Omega = TRUE, adjust.n = TRUE, score = TRUE, df = TRUE, numeric.derivative = FALSE, param = NULL, data = NULL, tol = 1e-05, n.iter = 20, trace = 0, ...)

# S3 method for lm2 sCorrect(object, ...)

# S3 method for gls sCorrect(object, adjust.Omega = TRUE, adjust.n = TRUE, score = TRUE, df = TRUE, numeric.derivative = FALSE, param = NULL, data = NULL, tol = 1e-05, n.iter = 20, trace = 0, cluster, ...)

# S3 method for gls2 sCorrect(object, ...)

# S3 method for lme sCorrect(object, adjust.Omega = TRUE, adjust.n = TRUE, score = TRUE, df = TRUE, numeric.derivative = FALSE, param = NULL, data = NULL, tol = 1e-05, n.iter = 20, trace = 0, cluster, ...)

# S3 method for lme2 sCorrect(object, ...)

# S3 method for lvmfit sCorrect(object, adjust.Omega = TRUE, adjust.n = TRUE, score = TRUE, df = TRUE, numeric.derivative = FALSE, param = NULL, data = NULL, tol = 1e-05, n.iter = 20, trace = 0, ...)

# S3 method for lvmfit2 sCorrect(object, ...)

sCorrect(x, ...) <- value

# S3 method for lm sCorrect(x, ...) <- value

# S3 method for lm2 sCorrect(x, ...) <- value

# S3 method for gls sCorrect(x, ...) <- value

# S3 method for gls2 sCorrect(x, ...) <- value

# S3 method for lme sCorrect(x, ...) <- value

# S3 method for lme2 sCorrect(x, ...) <- value

# S3 method for lvmfit sCorrect(x, ...) <- value

# S3 method for lvmfit2 sCorrect(x, ...) <- value

Arguments

object, x

a gls, lme, or lvm object.

adjust.Omega

[logical] should the standard errors of the coefficients be corrected for small sample bias?

adjust.n

[logical] should the correction for the degree of freedom be performed?

score

[internal] export the score.

df

[logical] should the degree of freedoms of the Wald statistic be computed using the Satterthwaite correction? Otherwise the degree of freedoms are set to Inf, i.e. a normal distribution is used instead of a Student's t distribution when computing the p-values.

numeric.derivative

[logical] should a numerical derivative be used to compute the first derivative of the information matrix? Otherwise an analytic formula is used.

param

[numeric vector, optional] the values of the parameters at which to perform the correction.

data

[data.frame, optional] the dataset relative to which the correction should be performed.

tol

[numeric >0] the minimum absolute difference between two estimation of the small sample bias. Below this value, the algorithm used to estimate the bias stop.

n.iter

[integer >0] the maximum number of iterations used to estimate the small sample bias of the residual variance-covariance matrix.

trace

[logical] should the execution of the function be traced.

...

[internal] only used by the generic method or by the <- methods.

cluster

[integer vector] the grouping variable relative to which the observations are iid. Only required for gls models with no correlation argument.

value

[logical] value for the arguments adjust.Omega and adjust.n.

Details

The argument value is equivalent to the argument bias.correct of the function summary2.