Dear R users:

I am trying to run a path analysis using sem package in R. But I have 
encountered one problem, below is my code:

SEMEX<-read.csv("D:/Documents and Settings/z3409964/Desktop/Hospital 1.csv")
library(sem)
cov.matrixSEMEX<-cov(na.omit(SEMEX))

SEMEX<-specifyModel()
CWB->CWB13,NA,1
CWB->CWB23,deviance1
CWB->CWB33,deviance2
CWB->CWB43,deviance3
STA->STA13,NA,1
STA->STA23,citizenship1
STA->STA33,citizenship2
STA->STA43,citizenship3
STA->STA53,citizenship4
SA->SA13,NA,1
SA->SA23,surface1
SA->SA33,surface2
DA->DA13,NA,1
DA->DA23,deep1
DA->DA33,deep2
NA->NA13,NA,1
NA->NA23,negative1
NA->NA33,negative2
PA->PA13,NA,1
PA->PA23,positive1
PA->PA33,positive2
CWB13<->CWB13,error1
CWB23<->CWB23,error2
CWB33<->CWB33,error3
CWB43<->CWB43,error4
STA13<->STA13,error5 
STA23<->STA23,error6
STA33<->STA33,error7
STA43<->STA43,error8
STA53<->STA53,error9
SA13<->SA13,error10    
SA23<->SA23,error11
SA33<->SA33,error12
DA13<->DA13,error13
DA23<->DA23,error14
DA33<->DA33,error15
NA13<->NA13,error16  
NA23<->NA23,error17  
NA33<->NA33,error18
PA13<->PA13,error19
PA23<->PA23,error20   
PA33<->PA33,error21 
CWB<->CWB,var1
STA<->STA,var2
SA<->SA,var3
DA<->DA,var4
PA<->PA,var5
NA<->NA,var6
SA->NA,beta1
NA->CWB,beta2
DA->PA,beta3
PA->OCB,beta4
SA->PA,beta5
DA->NA,beta6
OCB<->CWB,cov2

SEMEX<-sem(SEMEX,cov.matrixSEMEX, nrow(SEMEX))
summary(SEMEX,fit.indices=c("CFI","GFI","AGFI","RMSEA"))

Yet the output shows the following:

Error in summary.objectiveML(SEMEX, fit.indices = c("CFI", "GFI", "AGFI",  : 
  coefficient covariances cannot be computed
In addition: Warning message:
In vcov.sem(object, robust = robust, analytic = analytic.se) :
   singular Hessian: model is probably underidentified.

Can you help figure out what is going on? Thank you very much

Brad
                                          
        [[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