Dear Jinsong, This model is grossly underidentified because there are no exogenous variables in it. Your inability to estimate the model isn't a software issue.
Best, John ----------------------------------------------- John Fox Senator McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Jinsong Zhao > Sent: Thursday, August 30, 2012 10:47 AM > To: r-help@r-project.org > Subject: [R] path analysis help > > Hi there, > > I searched R-help list with "path analysis" as keyword, and learn that > sem package can do it. However, I don't figure out a way to construct > the model for the path diagram as Fig. 1. in Huang et al. (2002)[1]. > > I try the following code: > > huang.cor <- readMoments(diag=FALSE, names=c('x1', 'x2', 'x3', 'y')) > 0.76 > 0.91 0.72 > 0.94 0.77 0.83 > > huang.mod <- specifyModel() > x1 -> y, p1 > x2 -> y, p2 > x3 -> y, p3 > x1 -> x2, p12 > x2 -> x1, p21 > x2 -> x3, p23 > x3 -> x2, p32 > x1 -> x3, p13 > x3 -> x1, p31 > > huang.sem <- sem(huang.mod, huang.cor, 100)# 100 is arbitarious. > > It give the error message: > > Error in sem.default(ram, S = S, N = N, raw = raw, data = data, > param.names = pars, : > The model has negative degrees of freedom = -3 > > I don't know why. > > I hope to get direct effect, indirect effect and total effects for every > variable. However, I don't figure out how to do with sem package. It > there any other package that can do it? > > Any suggestion or hint will be greatly appreciated. > > Regards, > Jinsong > > > [1] Huang, B., Thornhill, N., Shah, S. and Shook, D. (2002). Path > analysis for process troubleshooting. Proceedings of Advanced Control of > Industrial Processes, Kumamoto, Japan, 10-12 June, 149-154. > url: http://eprints.ucl.ac.uk/494/1/HuangEtAl_AdConIP_2002.pdf > > ______________________________________________ > 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. ______________________________________________ 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.