qqplot2 | R Documentation |
QQplot for the residuals of a lvm object.
qqplot2(object, ...)
## S3 method for class 'lvmfit'
qqplot2(
object,
variables = NULL,
residuals = NULL,
plot = TRUE,
mfrow = NULL,
mar = c(2, 2, 2, 2),
qq.type = "qqtest",
name.model = "",
centralPercents = 0.95,
...
)
## S3 method for class 'list'
qqplot2(
object,
plot = TRUE,
mfrow = NULL,
mar = c(2, 2, 2, 2),
qq.type = "qqtest",
name.model = "",
centralPercents = 0.95,
...
)
## S3 method for class 'multigroupfit'
qqplot2(object, residuals = NULL, name.model = NULL, plot = TRUE, ...)
object |
a lvm model. |
... |
additional arguments to be passed to qqtest. |
variables |
the variable for which the residuals should be displayed. |
residuals |
[matrix] the residuals relative to each endogenous variable. |
plot |
[logical] should the graphic be displayed? |
mfrow |
how to divide the window. See |
mar |
[numeric vector] the number of lines of margin to be specified on the four sides of the plot (bottom, left, top, right). |
qq.type |
the function used to display the qqplot. Can be qqtest or qqnorm. |
name.model |
[character vector] character string to be displayed before the variable name in the title of the plot.
If |
centralPercents |
argument passed to |
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)
#### lvm object ####
library(lava)
m <- lvm(list(y~v1+v2+v3+v4,c(v1,v2,v3,v4)~x))
latent(m) <- ~ x
set.seed(10)
dd <- sim(m,100) ## Simulate 100 observations from model
e <- estimate(m, dd) ## Estimate parameters
qqplot2(e)
#### multigroup object ####
e2 <- estimate(list(m1=m,m2=m), split(dd, dd$v1>0)) ## Estimate parameters
qqplot2(e2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.