No picture attached, and you don't tell us what your trouble is, but your
model has -4 df, so it's incorrectly specified.

Take out these lines:

congressmanAttitudes ~~ congressmenPerceptConstiuentAttitudes
congressmenPerceptConstiuentAttitudes ~~ constiuentAttitudes
rollCallBehav ~~ congressmenPerceptConstiuentAttitudes
rollCallBehav ~~ congressmanAttitudes

And your model runs, with 0 df.

Your latent variable does nothing, becuase you only only have one variable
which relates to it.

Jeremy

P.S. There's a lavaan group on google groups.



On 30 April 2014 08:02, Patzelt, Edward <patz...@g.harvard.edu> wrote:

> R Community -
>
> I'm trying to build the model in the image below, but having troubles
> correctly specifying the syntax:
>
> library(lavaan)
>
> library(semPlot)
>
> lower <- matrix(c(1, 0, 0, 0, .475, 1, 0, 0, .738, .643, 1, 0, .608, .721,
> .823, 1), 4, 4, byrow = TRUE)
>
>
> colnames(lower) <- rownames(lower) <- c("constiuentAttitudes",
> "congressmanAttitudes", "congressmenPerceptConstiuentAttitudes",
> "rollCallBehav")
>
>
> mod1 <- '
>
> # latent vars
>
> constiuentAttitudes =~ congressmenPerceptConstiuentAttitudes
>
>
> # regressions
>
>
>
> congressmanAttitudes ~ congressmenPerceptConstiuentAttitudes
>
> rollCallBehav ~ congressmenPerceptConstiuentAttitudes +
> congressmanAttitudes
>
>
> # error
>
> congressmanAttitudes ~~ congressmenPerceptConstiuentAttitudes
>
> congressmenPerceptConstiuentAttitudes ~~ constiuentAttitudes
>
> rollCallBehav ~~ congressmenPerceptConstiuentAttitudes
>
> rollCallBehav ~~ congressmanAttitudes
>
> '
>
>
> mod1fit <- sem(mod1, sample.cov = lower, sample.nobs = 116)
>
>
> semPaths(mod1fit, what = "est", layout = "tree", title = TRUE, style
> ="LISREL"
> , nCharNodes = 10)
>
>
>
>
>
>
>
> --
>
> *Edward H Patzelt | Clinical Science PhD StudentPsychology | Harvard
> University *
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to