Skip to content
Prev 332554 / 398506 Next

Path Analysis

Dear Sarah,

It's generally a good idea to include a reproducible example if you want to get help with a problem, but in this case it's a safe bet that the problem is that the model you specified has no variance or covariance parameters for the variables x1 and x2, which, I assume, you mean to be exogenous. The easiest way to include these variances and covariance in the model is to specify the argument fixed.x=c("x1", "x2") in the call to sem().

In addition:

(1) Your model is fully recursive (guessing that all the x's and y's are observed variables), and so it amounts to four OLS regressions. You could just use lm() to fit the model.

(2) It's generally easier in the sem package to use specifyEquations() than specifyModel() for model specification.

(3) If you have the original data set, as you do, it's generally preferable to use the data argument to sem() than to pass it the covariance matrix for the observed variables.

I hope that this helps,
 John


------------------------------------------------
John Fox
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
	
On Sat, 2 Nov 2013 11:02:31 +0100
Sarah Rogers <rogerssarah65 at gmail.com> wrote: