Attachment | Size |
---|---|

OUTPUT.txt | 9.76 KB |

kodingan data Yogya Bali (DataFilter)1.txt | 4.39 KB |

hallo,

I want to ask about optimalization my SEM model. i confused how to set a starting value for each variable? i send my code but in result, i get still NaN in the standar estimation.

in my result, RMSEA still more than 0.08 and the CFI still less than 0.9. so, what should i do?

The starting values for each free parameter are the numbers you provide to the

`values`

argument in each`mxPath()`

statement. For example, in your first`mxPath()`

, you provide a start value of 0.5 for each of those two-headed path coefficients. (BTW, you could just use`values=0.5`

instead, and R will automatically expand it to that vector of 0.5s).As you said in your post, you are seeing standard errors of

`NaN`

for some, but not all, of the free parameters. The most likely reason for this is that the optimizer has not found a minimum of the deviance (-2loglikelihood) function. There are several things you could do about this. The simplest is probably to re-run your model from the initial solution. After you run`twoFactorFitskripsi<- mxRun(FactorModelskripsi)`

, then run`twoFactorFitskripsi<- mxRun(twoFactorFitskripsi)`

, and see if you still get standard errors of`NaN`

. Another thing you could do is go back and change the start values in your model; you could set each start value to be closer to its resulting value from your fitted model (i.e., the values you see in the`summary()`

output).You can be pretty sure that the optimizer has found the minimum if there are no standard errors of

`NaN`

, the -2 log likelihood in the output is smaller than it is now, and you can run your model without getting any warnings.Regarding the absolute fit indices you mentioned (RMSEA and CFI), you will want to wait until it looks like the deviance is at the minimum before you try to interpret them. Beyond that, you might want to consider a suggestion M. Hunter made in another one of your threads, which is to run several different alternative models and compare how well they fit. Since I don't know anything about your data or your research questions, I can't really be more specific than that.

Rob's explanation is clear and helpful: because mxRun returns a model, you can run it multiple times, and sometimes see an improvement in fit. It's also the case that if your starting values are too far from the well-fitting values, then picking some new starts might be helpful.

In this case it seems likely that the poor RMSEA is telling you this model doesn't adequately capture your data: You need to modify it, adding some paths somewhere.

You'll find it much easier to read and maintain your models if you code more like this:

than this:

thank you for your answer, i try to change starting value, and then the result no observation is NaN. but my problem still same, criteria of fit model is not good (look from RSMEA, P Value, CFI). history in the SEM, we can't add path if we don't know historical in early model. is there any other way to make the criteria of RSMEA, CFI etc be better apart from adding path?

It's difficult to tell without seeing the code, but I suspect that you are trying to estimate factor variances AND all factor loadings to the indicators. An easy solution is to fix the factor variances to 1.0

If the model is under identified, you will get NaN's for at least some of the Standard Errors. The solution reported may be one of thousands that would fit equally well (and different starting values may find different, equally good, solutions).