Description Usage Arguments Value Author(s) Examples
Calculates various GOF statistics for model object including global chi-squared test statistic and AIC. Extract model-specific mean and variance structure, residuals and various predicitions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | gof(object, ...)
## S3 method for class 'lvmfit'
gof(object, chisq=FALSE, level=0.90, rmsea.threshold=0.05,all=FALSE,...)
moments(x,...)
## S3 method for class 'lvm'
moments(x, p, debug=FALSE, conditional=FALSE, data=NULL, ...)
## S3 method for class 'lvmfit'
logLik(object, p=coef(object),
data=model.frame(object),
model=object$estimator,
weight=Weight(object),
weight2=object$data$weight2,
...)
## S3 method for class 'lvmfit'
score(x, data=model.frame(x), p=pars(x), model=x$estimator,
weight=Weight(x), weight2=x$data$weight2, ...)
## S3 method for class 'lvmfit'
information(x,p=pars(x),n=x$data$n,data=model.frame(x),
model=x$estimator,weight=Weight(x), weight2=x$data$weight2, ...)
|
object |
Model object |
x |
Model object |
p |
Parameter vector used to calculate statistics |
data |
Data.frame to use |
weight2 |
Optional second data.frame (only for censored observations) |
weight |
Optional weight matrix |
n |
Number of observations |
conditional |
If TRUE the conditional moments given the covariates are calculated. Otherwise the joint moments are calculated |
model |
String defining estimator, e.g. "gaussian" (see
|
debug |
Debugging only |
chisq |
Boolean indicating whether to calculate chi-squared goodness-of-fit (always TRUE for estimator='gaussian') |
level |
Level of confidence limits for RMSEA |
rmsea.threshold |
Which probability to calculate, Pr(RMSEA<rmsea.treshold) |
all |
Calculate all (ad hoc) FIT indices: TLI, CFI, NFI, SRMR, ... |
... |
Additional arguments to be passed to the low level functions |
A htest
-object.
Klaus K. Holst
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | m <- lvm(list(y~v1+v2+v3+v4,c(v1,v2,v3,v4)~x))
set.seed(1)
dd <- sim(m,1000)
e <- estimate(m, dd)
gof(e,all=TRUE,rmsea.threshold=0.05,level=0.9)
set.seed(1)
m <- lvm(list(c(y1,y2,y3)~u,y1~x)); latent(m) <- ~u
regression(m,c(y2,y3)~u) <- "b"
d <- sim(m,1000)
e <- estimate(m,d)
rsq(e)
##'
rr <- rsq(e,TRUE)
rr
estimate(rr,contrast=rbind(c(1,-1,0),c(1,0,-1),c(0,1,-1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.