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

WLS_defitionvar_not_working.R | 960 bytes |

Hi,

The use of definition variable for regression in means model is not working for me when using WLS. Think it was supposed to work from version 2.12 and onwards, but I haven't gotten it to work. I haven't tried different platforms or software configs, so maybe it has something to do with these.

Attached is an example where it fails (but the ML-fitfunction works fine).

Here's my sessionInfo():

R version 3.4.1 (2017-06-30)

Platform: x86_64-w64-mingw32/x64 (64-bit)

Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:

[1] LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252 LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C

[5] LC_TIME=Swedish_Sweden.1252

attached base packages:

[1] stats graphics grDevices utils datasets methods base

other attached packages:

[1] OpenMx_2.13.2

loaded via a namespace (and not attached):

[1] MASS_7.3-50 compiler_3.4.1 Matrix_1.2-10 parallel_3.4.1 tools_3.4.1 Rcpp_0.12.17 grid_3.4.1 digest_0.6.12

[9] lattice_0.20-35

You'll need to use RAM or LISREL so OpenMx knows which variables are latent. This feature isn't supported for mxExpectationNormal.

Aha!

This was not clear from the release comments, but makes perfect sense to me now!

Thanks for quick response.

Hi again,

I cannot seem to understand exactly how I do get the definition variables to work in the LISREL model using WLS, do you have a working example? (RAM isn't flexible enough for the implementations I'm considering.)

The only info I can find is from the 2.12 release: " Third, the WLS fitfunction is now compatible with exogenous covariates. That is, you can now use WLS if your model contains definition variables, as long as those definition variables are only involved in the model for the endogenous variables' means. "

"Endogenuous variables' means", does that mean the mean the model for eta ('alpha' in the latent variable equation)? Or does it imply the indicators of eta ('tau_y' in the measurement equation for endogoneous variables)? I've tried including the definition variable to work on the mean in both those places (i.e., alpha or tau_y), but doesn't work for me (works fine using ML fit function).

Am I misunderstanding some central concept? Like, should definition variables not be intered as "data.variablename"? Or something about the dimnames I've entered?

Would be glad to get some feedback since definition variable adjustment (to be used for simple regressions for expected means/thresholds) in WLS would save me a lot of optimization time, especially now when the WLS is so quick (and ML often fails when many ordinal variables are included).

Here's some code where I tried to use definition variable, entered as "data.u", covariate for regression.

I'll look at your script soon. Until then, here's an example. I'm not sure whether I've tested models specified using matrix notation. Path notation should work though.

I'm sorry the release announcement for v2.12 wasn't clearer about definition variables with WLS. I scribe the release announcements, and it was news to me when, earlier in this thread, Joshua said you have to use RAM or LISREL specification to use definition variables with WLS.

TY cannot be an algebra. You need to express the exogenous predictor as a latent variable with zero variance (PS(u,u)=0). Estimate the regression coefficient in LY (manifest loadings). Entries associated with u in BE (latent loadings) must be fixed to zero.

I received a notification for this thread today. Did something change? Is your issue solved?