Skip to content

Instantly share code, notes, and snippets.

@masaha03
Created May 4, 2012 21:41
Show Gist options
  • Save masaha03/2597932 to your computer and use it in GitHub Desktop.
Save masaha03/2597932 to your computer and use it in GitHub Desktop.
data(iris)
model.iris <- cfa()
F1: Sepal.Length, Sepal.Width, Petal.Length, Petal.Width
# 特殊記号はエスケープする必要がある
model.iris2 <- update(model.iris)
replace, lam\[Petal.Width:F1\], b2
model.iris3 <- update(model.iris)
replace, lam\[Petal.Width:F1\], b3
model.mg.iris <- multigroupModel(
model.iris, model.iris2, model.iris3,
groups=c("setosa", "versicolor", "virginica"))
sem.mg.iris <- sem(model.mg.iris, data=iris, group="Species",
formula= ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width)
summary(sem.mg.iris)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment