You are here

Latent spline/piecewise regression model on cross sectional data

5 posts / 0 new
Last post
PaulTwin's picture
Offline
Joined: 01/29/2017 - 09:25
Latent spline/piecewise regression model on cross sectional data
AttachmentSize
Image icon Spline regression model11.65 KB

Hello,

For my research, I would like to estimate the association between two latent variables using a spline/piecewise regression model with a single knot. The model should estimate two separate linear regression lines and the knot location (see attached image).
The two latent variables are anxiety and negative affectivity and both are measured with 7 indicators on a 1-5 Likert Scale.

On this forum, I read some topics about spline models in a growth model context, but I do not know whether such models can easily be transformed to spline models suitable for estimating associations between two latent variables using cross-sectional data.

I found an article by Jeffrey Harring (https://journals.sagepub.com/doi/pdf/10.1177/0013164413504295) that explains the mathematics of estimating such a model.

Is it possible to program this model in OpenMx?

Best wishes,
Paul

AdminNeale's picture
Offline
Joined: 03/01/2013 - 14:09
Yes I think so

Possibly via bivariate normal integration over the two latent variables. I think you may need a user-defined fit function. The sign function may help. It is an interesting problem - will try to look at the paper too. Some ‘case’ { style functionality seems needed more generally.

Cheers
Mike

PaulTwin's picture
Offline
Joined: 01/29/2017 - 09:25
Thanks!

Thanks Mike! Good to know it is probably possible to estimate this model in Openmx.

I have no experience in specifying my own fit functions. Does this mean that I have to write an R function to compute the likelihood according to equations 16 and 17 in the paper?

I am also unsure how to add the non-linear regression parameters (e.g. knot location, two separate regression coefficients for the association between the two latent variables; see equation 4) to my model using either the mxMatrix or mxPath notation.

I greatly appreciate any help with these issues.

Best wishes,
Paul

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
MxFitFunctionR or MxFitFunctionAlgebra
I have no experience in specifying my own fit functions. Does this mean that I have to write an R function to compute the likelihood according to equations 16 and 17 in the paper?

You could write an arbitrary R function to evaluate the likelihood, and put an MxFitFunctionR into your MxModel. Alternately, if it's possible to express that function as an MxAlgebra, then you could do that, and use an MxFitFunctionAlgebra. The latter will be faster, but MxAlgebras aren't as general as R.

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
suggestion

A biostatistics student I work with has a preprint out that might be useful to you. You could try contacting her for her R syntax.