[R] Fit sem model with intercept

John Fox jfox at mcmaster.ca
Sun Apr 15 14:31:38 CEST 2007


Dear adschai,

You needn't look too far, since the last example in ?sem is for a model with
an intercept. One would use the raw-moment matrix as input to sem(), either
entered directly or calculated with the raw.moments() function in the sem
package. The row/column of the raw-moment matrix is given a name just like
the other columns. You could use the name "1"; in the example, the name is
"UNIT".

As you say, however, you're using polychoric and polyserial correlations as
input. Since the origin and scale of the latent continuous variables
underlying the ordinal variables are entirely arbitrary, I can't imagine
what the purpose of a model with an intercept would be, but it's possible
that I'm missing something. If you think that this makes some sense, then
you could convert the correlations to raw moments by using the means and
standard deviations of the observed variables along with the means and
standard deviations that you assign to the latent variables derived from the
ordinal variables (the latter on what basis I can't imagine, but I suppose
you could fix them to 0s and 1s).

Finally, if the sem model that you show is meant to be a complete
specification, I notice that it includes no covariance components; moreover,
if this is the complete structural part of the model, then I think it is
underidentified, and the two parts of the model (those involving eta1 and
eta2) appear entirely separate.

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of 
> adschai at optonline.net
> Sent: Sunday, April 15, 2007 4:28 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Fit sem model with intercept
> 
> Hi - I am trying to fit sem model with intercepts. Here is 
> what I have in my model.
> 
> Exogeneous vars: x1 (continous), x2 (ordinal), x3 (ordinal), 
> x4(continuous) Endogeneous vars: y1 (continuous), y2 
> (ordinal), y3 (ordinal)
> 
> SEM model:
>     x1 -> eta1; x2 -> eta1; x3 -> eta2; x4 -> eta2; eta1 -> 
> y1, eta1 -> y2, eta2 -> y2, eta2 -> y3 
> 
> However, in these arrow models, I don't know how to add 
> intercept onto it. I am trying to find an example code using 
> sem package on how to incorporate intercept but cannot find 
> any documents on the web. Or we can simply add something like 
> this? '1 ->  eta1'? This is my first question. 
> 
> Also, note that since my y2 and y3 are ordinal, I used the 
> 'hetcor' to calculate correlation of observed variables. 
> However, from the document, I would need to use the 
> covariance matrix rather then the correlation. And I need 
> additional column for 1. I am not sure how this matrix should 
> look like and how I can obtain this? If there is any example 
> you could point me to, I would really appreciate. Thank you.
> 
> - adschai
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list