donaldRwilliams / BGGM

Bayesian Gaussian Graphical Models
https://donaldrwilliams.github.io/BGGM/
GNU General Public License v2.0
54 stars 14 forks source link

Within- and Between-person network models on longitudinal data #36

Closed aanders8 closed 4 years ago

aanders8 commented 4 years ago

The ability to have a mix of variables (ordinal, binary, continuous) in BGGM has been quite helpful. I've been utilizing it for a secondary analysis on some longitudinal 3-wave health survey data (depression diagnosis, exercise frequency, smoking, social interaction etc).

I wanted to see if you could offer any guidance on applying these Gaussian models to large-interval longitudinal data. I've seen some (Costantini, Richetin,Preti et al., 2019) suggest that you can take time series data and look at within-person and between-person networks. They and the papers they reference indicate you can use compute person-centered versions of the variables to assess the within-person variance and mean versions of the variables to assess between-person variance. Those variables can be used in two separate models: a within-person network model and between-person network model. Those approaches are meant for continuous data and ordinal data (e.g. Epskamp, Borsboom, & Fried, 2018).

I know the 'mixed' option in BGGM is set up to handle the various types of data in cross-sectional research, but would it work for person-centered versions of binary (smoker status) and ordinal variables (sleep problem severity on an ordinal scale from 1-7)? The transformation from the binary smoker status variable, normally coded as 0 or 1, might become .333, .333, and -.667 over three waves of data if person-centered.

On a separate note, if you know of other ways of analyzing longitudinal network data to look at the variation in the networks over time, that would be great to hear too. Thanks for all your work.

donaldRwilliams commented 4 years ago

Hi: I do actually know of a couple ways to model time series data. the approach is based on a Gaussian copula and works for discrete data.

Now I do think that perhaps 3 waves might be a bit ambitious to estimate the person specific networks, but perhaps the between person network would make sense.

Let me take a close look at the papers to see if one could make sense. I know they exist for this kind of thing, but not sure of the Bayesian implementation. Worse case scenario I know one of the papers has R code to estimate the model with a classical approach, so non bayesian. It handles transforming the data, etc..

Anyhow, I will follow-up on this tomorrow.

donaldRwilliams commented 4 years ago

@aanders8 I found this paper that has a R package.

https://arxiv.org/pdf/1805.09840.pdf

Unfortunately, I think implementing it in BGGM will take a bit of time. But, anyhow, that approach can be used for mixed data time series.

aanders8 commented 4 years ago

That's helpful, thank you. I started looking into that paper and it got me thinking more about what seems feasible with the present data.

What if the interest was not to model individual networks (which I agree with 3 time points seems ambitious), but rather one overall contemporaneous network using the three waves of person-centered variables and one between-person network using the person-means of the variables? In that way I'm not interested in how time-1 network predicts time-2 network, or in individual people's networks, but rather, how the within-person fluctuations in the variables are associated with each other (within-person) and how are the person averages in the variables associated with each other (between-person). Would the mixed option seem to be able to appropriately handle that?

Another potentially related question is, when using the "mixed" option, are all the variables, whether binary, ordinal, or continuous treated the same way? I noticed that the estimate function does not allow for non-numeric (factor) variables so my sense is that whether the variable is ordinal or continuous, the way they are used to calculate the underlying partial correlation matrix (if that's the right term) is the same. I ask because one of my concerns was that by taking a binary or ordinal variable and person-centering it, that it would introduce more possible values than the original scale and change the way it's treated by estimate.

donaldRwilliams commented 4 years ago

I am not really sure I am in a position to give advice about those kind of networks. But there is nothing stopping you from taking the means, etc.

And all the variables are treated the same for the mixed approach. It is based on a copula model, which, in turn, is based on rank.s Hence, all variables are treated the same. Whether it makes great sense to person center the variables I am not so sure.

I will have to think about it a bit more :-)

aanders8 commented 4 years ago

Thanks for for the additional response!And that's good to know about the copula model.