cvCheck | R Documentation |
Test the sensibility of the lvm estimate to the initialization points
cvCheck(object, ...)
## S3 method for class 'lvm'
cvCheck(
object,
data,
factor.vcov = 1,
n.init = 100,
keep.cov = TRUE,
ncpus = 1,
trace = TRUE,
...
)
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? |
Simulation is based on a multivariate truncated normal law (even though it is not satifying for the variance components)
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.