cvCheck: Test the sensibility of the lvm estimate to the...

cvCheckR Documentation

Test the sensibility of the lvm estimate to the initialization points

Description

Test the sensibility of the lvm estimate to the initialization points

Usage

cvCheck(object, ...)

## S3 method for class 'lvm'
cvCheck(
  object,
  data,
  factor.vcov = 1,
  n.init = 100,
  keep.cov = TRUE,
  ncpus = 1,
  trace = TRUE,
  ...
)

Arguments

object

a lvm model

...

additional arguments to be passed to estimate

data

a data frame

factor.vcov

inflation factor for the variance when sampling the initialization points

n.init

number of initialization points to be used

keep.cov

should the covariance between parameter be kept to simulate the initialization points

ncpus

the number of CPU to be used

trace

should a progression bar be displayed?

Details

Simulation is based on a multivariate truncated normal law (even though it is not satifying for the variance components)

Value

a data frame/cvlvm object containing the convergence status (by default 0 indicates successful convergence, see ?optim), the value of the log-likelihood and the estimated parameters (in columns) for each initialization (in rows)

Examples

m <- lvm(list(y~v1+v2+v3+v4,c(v1,v2,v3,v4)~x))
covariance(m) <- v1~v2+v3+v4
dd <- lava::sim(m,10000) ## Simulate 10000 observations from model
e <- estimate(m, dd) ## Estimate parameters

## Not run: 
summary(cvCheck(m, dd, ncpus = 1))
# summary(cvCheck(m, dd, ncpus = 4))

## End(Not run)




bozenne/butils documentation built on Oct. 14, 2023, 6:19 a.m.