You are here

Problems with model fit

2 posts / 0 new
Last post
Idunnu's picture
Offline
Joined: 03/11/2015 - 15:58
Problems with model fit

This is what i wrote for my model specification but I'm getting this error
2: In eval(expr, envir, enclos) :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.

> model.dhp <- specifyModel ()
1: EA_response -> EA_survival,NA,1
2: EA_response -> EA_progeny,gam12
3: EA_response -> EA_progeny_wet_mass,gam13
4: EA_response -> EA_progeny_dry_mass,gam14
5: FC_response -> FC_survival,NA,1
6: FC_response -> FC_progeny,gam22
7: BA_response -> Ba_emergence,NA,1
8: BA_response -> Ba_shoot_length,gam32
9: BA_response -> Ba_root_length,gam33
10: BA_response -> Ba_shoot_dry_mass,gam34
11: BA_response -> Ba_root_dry_mass,gam35
12: NWG_response ->NWG_emergence,NA,1
13: NWG_response ->NWG_shoot_length,gam42
14: NWG_response ->NWG_root_length,gam43
15: NWG_response ->NWG_shoot_dry_mass,gam44
16: NWG_response ->NWG_root_dry_mass,gam45
17: Alf_response ->Alf_emergence,NA,1
18: Alf_response ->Alf_shoot_length,gam52
19: Alf_response ->Alf_root_length,gam53
20: Alf_response ->Alf_shoot_dry_mass,gam54
21: Alf_response ->Alf_root_dry_mass,gam55
22: Agg.Response -> EA_response,NA,1
23: Agg.Response -> FC_response,lam1
24: Agg.Response -> BA_response,lam2
25: Agg.Response -> NWG_response,lam3
26: Agg.Response -> Alf_response,lam4
27: EA_progeny <-> EA_progeny, theta21, NA
28: EA_progeny_dry_mass <-> EA_progeny_dry_mass, theta22, NA
29: EA_progeny_wet_mass <-> EA_progeny_wet_mass, theta23, NA
30: FC_progeny <-> FC_progeny, theta24, NA
31: FC_survival <-> FC_survival, theta25, NA
32: Ba_emergence <-> Ba_emergence, theta26, NA
33: Ba_root_dry_mass <-> Ba_root_dry_mass, theta27, NA
34: Ba_root_length <-> Ba_root_length, theta28, NA
35: Ba_shoot_dry_mass <-> Ba_shoot_dry_mass, theta29, NA
36: Ba_shoot_length <-> Ba_shoot_length, theta30, NA
37: NWG_emergence <-> NWG_emergence, theta31, NA
38: NWG_root_dry_mass <-> NWG_root_dry_mass , theta32, NA
39: NWG_root_length <-> NWG_root_length, theta33, NA
40: NWG_shoot_dry_mass <-> NWG_shoot_dry_mass, theta34, NA
41: NWG_shoot_length <-> NWG_shoot_length, theta35, NA
42: Alf_emergence <-> Alf_emergence, theta36, NA
43: Alf_root_dry_mass <-> Alf_root_dry_mass, theta37, NA
44: Alf_root_length <-> Alf_root_length, theta38, NA
45: Alf_shoot_dry_mass <-> Alf_shoot_dry_mass, theta39, NA
46: Alf_shoot_length <-> Alf_shoot_length, theta40, NA
47: EA_Response <-> EA_Response, theta41, NA
48: FC_Response <-> FC_Response, theta42, NA
49: BA_Response <-> BA_Response, theta43, NA
50: NWG_Response <-> NWG_Response, theta44, NA
51: Alf_Response <-> Alf_Response, theta41, NA
52: Agg.Response <-> Agg.Response, NA, 1
53:

Read 52 records
NOTE: it is generally simpler to use specifyEquations() or cfa()
see ?specifyEquations
NOTE: adding 6 variances to the model

> out<-sem(model.dhp,datacov,N=34)
Warning messages:
1: In sem.semmod(model.dhp, datacov, N = 34) :
The following observed variables are in the input covariance or raw-moment matrix but do not appear in the model:
Soil, Soil.1, Rep, F2, F3, F4, Soil_Moisture, pH, Conductivity, WHC, Total_Nitrogen, Total_Carbon, InCarbon, OrgCarbon, Phosphorous, Organic_Matter, Gravel, Sand, VeryFineSand, FineSand, MediumSand, CoarseSand, VCourseSand, Silt, Clay

2: In eval(expr, envir, enclos) :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.

neale's picture
Offline
Joined: 07/31/2009 - 15:14
This is a sem() package question

Hi Idunnu

Your question is about sem(). However, you could fit your model with OpenMx. The example of a simple factor model on the homepage http://openmx.psyc.virginia.edu would be a good place to start. I suspect that you would get a similar failure to obtain a result if the model is not identified -- the QR warning probably indicates that this is the issue.