| iid2 | R Documentation | 
Extract the influence function from a latent variable model.
It is similar to lava::iid but with small sample correction.
iid2(object, ...)
## S3 method for class 'lvmfit'
iid2(
  object,
  robust = TRUE,
  cluster = NULL,
  as.lava = TRUE,
  ssc = lava.options()$ssc,
  ...
)
## S3 method for class 'lvmfit2'
iid2(object, robust = TRUE, cluster = NULL, as.lava = TRUE, ...)
## S3 method for class 'lvmfit2'
iid(x, robust = TRUE, cluster = NULL, as.lava = TRUE, ...)
| object,x | a  | 
| ... | additional argument passed to  | 
| robust | [logical] if  | 
| cluster | [integer vector] the grouping variable relative to which the observations are iid. | 
| as.lava | [logical] if  | 
| ssc | [character] method used to correct the small sample bias of the variance coefficients ( | 
When argument object is a lvmfit object, the method first calls estimate2 and then extract the variance-covariance matrix.
A matrix containing the 1st order influence function relative to each sample (in rows) and each model coefficient (in columns).
estimate2 to obtain lvmfit2 objects.
#### simulate data ####
n <- 5e1
p <- 3
X.name <- paste0("X",1:p)
link.lvm <- paste0("Y~",X.name)
formula.lvm <- as.formula(paste0("Y~",paste0(X.name,collapse="+")))
m <- lvm(formula.lvm)
distribution(m,~Id) <- Sequence.lvm(0)
set.seed(10)
d <- sim(m,n)
#### latent variable model ####
e.lvm <- estimate(lvm(formula.lvm),data=d)
iid.tempo <- iid2(e.lvm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.