Correct the bias of the ML estimate of the variance and compute the first derivative of the information matrix.
Compute bias corrected residuals variance covariance matrix and information matrix. Also provides the leverage values and corrected sample size when adjust.n is set to TRUE.
estimate2(
object,
param,
data,
ssc,
df,
derivative,
hessian,
dVcov.robust,
iter.max,
tol.max,
trace,
...
)# S3 method for lvm
estimate2(
object,
param = NULL,
data = NULL,
ssc = lava.options()$ssc,
df = lava.options()$df,
derivative = "analytic",
hessian = FALSE,
dVcov.robust = FALSE,
iter.max = 100,
tol.max = 1e-06,
trace = 0,
...
)
# S3 method for lvmfit
estimate2(
object,
param = NULL,
data = NULL,
ssc = lava.options()$ssc,
df = lava.options()$df,
derivative = "analytic",
hessian = FALSE,
dVcov.robust = FALSE,
iter.max = 100,
tol.max = 1e-06,
trace = 0,
...
)
# S3 method for list
estimate2(object, ...)
# S3 method for mmm
estimate2(object, ...)
.sscResiduals(object, ssc, algorithm = "2")
a lvm
object.
[numeric vector, optional] the values of the parameters at which to perform the correction.
[data.frame, optional] the dataset relative to which the correction should be performed.
[character] method used to correct the small sample bias of the variance coefficients: no correction ("none"
/FALSE
/NA
),
correct the first order bias in the residual variance ("residual"
), or correct the first order bias in the estimated coefficients "cox"
).
Only relevant when using a lvmfit
object.
[character] method used to estimate the degree of freedoms of the Wald statistic: Satterthwaite "satterthwaite"
.
Otherwise ("none"
/FALSE
/NA
) the degree of freedoms are set to Inf
.
Only relevant when using a lvmfit
object.
[character] should the first derivative of the information matrix be computed using a formula ("analytic"
) or numerical derivative ("numeric"
)?
[logical] should the hessian be stored? Can be NULL
to indicate only if computed during the small sample correction.
[logical] should the first derivative of robust variance-covariance matrix be stored?
[integer >0] the maximum number of iterations used to estimate the bias correction.
[numeric >0] the largest acceptable absolute difference between two succesive estimates of the bias correction.
[logical] should the execution of the function be traced.
arguments passed to lava::estimate
when using a lvm
object.
The argument value
is equivalent to the argument bias.correct
of the function summary2
.
#### simulate data ####
set.seed(10)
dW <- sampleRepeated(10, format = "wide")
#### latent variable model ####
m.lvm <- lvm(Y1~X1+X2+Z1)
e2.lvm <- estimate2(m.lvm, data = dW)
summary2(e2.lvm)
Run the code above in your browser using DataLab