nsem: Non-linear structural equation models

Description Usage Arguments Details Value Author(s) Examples

Description

Fits non-linear SEM via 1. order Laplace Approximation

Usage

1
2
3
nsem(model, data, laplace.control = list(), control = list(trace = 1),
  method = c("nlminb", "BFGS", "ucminf"), vcov = TRUE, p, fast = FALSE,
  ...)

Arguments

model

model list

data

data.frame

laplace.control

Options to the Laplace Approximation algorithm

control

Options parsed on to optimizer (nlminb)

method

Optimization method

vcov

Boolean indicating whether calculation of asymptotic standard

p

(Optional) evaluate log-likelihood in p

fast

if TRUE do not spend time on returning lava object/graph errors should be disabled

...

Additional parameters parsed on to lower level functions

Details

The model arguments must be a named list: list( measure0, measure1, measure2, pred0, pred1, pred2, model)

where 'model' currently can be either 'nsem2' (2-factor model) or 'nsem3' (3-factor model). Each of the remaining elements can be either character vectors or formulas.

Alternatively, a list of lists can be used as the model argument in which case a list of data.frames also much be given as data argument. A multigroup model is then fitted.

Value

lava.nlin object (available methods: coef, logLik, score, vcov, print, ...)

Author(s)

Klaus K. Holst

Examples

1
2
3
4
5
## Not run: 
model1 <- list(measure1=~parc+supfc+antcin+postcin,measure2=~thS+putS+midbrainS,pred0=~age+bmi,model="nsem3")
b <- nsem(model1,data=dtrp)

## End(Not run)

kkholst/lava.nlin documentation built on May 20, 2019, 10:47 a.m.