Re: Longitudinal Analysis using allIndPars

75 views
Skip to first unread message

Woo-Young Ahn

unread,
Dec 4, 2023, 1:52:03 AM12/4/23
to law.cry...@gmail.com, hbayesdm-users, Jeung-Hyun Lee, 이은휘
Hi Crystal,

Here’s the response from Eunhwi, which is attached below. Unfortunately, I deleted the message from the mailing list by mistake while deleting many spam messages and I apologize for that. 

Thanks for your interest in our package/work and please let us know if you have any further questions. 


Best,
Young

—————————

Hi Crystal,

1) If you are planning to conduct modeling for a within-subject design and are particularly interested in alterations across different timepoints, I recommend making slight modifications to the original Stan codes provided in the hBayesDM package. This adjustment will enable you to estimate the extent of alteration in target parameters. I have attached a sample code for within-subject modeling, which you can refer to.

2) If you employ within-subject modeling and estimate parameter alterations, you'll have the opportunity to conduct a group comparison. This analysis can help identify credible differences in alteration patterns (e.g., size and direction) between sexes.

Feel free to reach out if you have any further questions or need additional clarification.

Best,
Eunhwi
—————————





gng_w1.stan

Crystal Law

unread,
Dec 8, 2023, 2:54:38 AM12/8/23
to Woo-Young Ahn, Jeung-Hyun Lee, hbayesdm-users, 이은휘
Hi Young & Eunhwi,

I appreciate your prompt and informative response. The provided codes and explanations are instrumental for my project on developmental trajectory comparisons between sexes within subjects. 

I have a subsequent query regarding our cohort study, which encompasses numerous variables beyond the BART performance. 
We aim to explore the associations of the male cohort members’ parameter values with other factors, namely their testosterone levels, brain volume imaging data, and various mental health score indicators (n=~1200, all males). 

Would it be methodologically sound to employ these parameter values as independent variables and the aforementioned factors as dependent variables in regression models for this analysis? 

Your guidance on this matter would be greatly valued. 

Best regards, 
Crystal


Woo-Young Ahn
Associate Professor, Department of Psychology
Adjunct Professor, Department of Brain & Cognitive Sciences
Seoul National University
Building 16, Room M505
Email: wah...@snu.ac.krwooyou...@gmail.com
Office: +82-2-880-2538
Web: ccs-lab.github.iohappylaboratory.org / ahnlab.org

On Nov 30, 2023, at 10:59 AM, law.cry...@gmail.com <law.cry...@gmail.com> wrote:

Hi there,

I hope this message finds you well.

I'm reaching out for guidance on a longitudinal analysis I'm conducting using hBayesdm.
In my study, I have run separate hBayesdm analyses for each sex at two distinct timepoints, resulting in four separate runs.
The first timepoint includes the main cohort with approximately 1500 individuals of each sex,
and the second timepoint involves a smaller subsample of around 120 individuals per sex.

I have two methodological questions:
1. With the 'allIndPars' obtained from these analyses, is it appropriate to perform a within-subject repeated measure t-test using the same 'subjID' across the timepoints?
This is to examine the developmental progression of cognitive parameters.

2. Would comparing the patterns observed between sexes across these timepoints provide a valid interpretation of different cognitive developmental trajectories?

Thank you for your time and insight.
Best regards
Crystal

--
You received this message because you are subscribed to the Google Groups "hbayesdm-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbayesdm-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbayesdm-users/016eeef6-f543-4ecd-a403-04e703bface8n%40googlegroups.com.

Eunhwi Lee

unread,
Dec 8, 2023, 3:54:32 AM12/8/23
to hbayesdm-users
Hi Crystal,

Certainly! You can extract the posterior means from the estimated distribution, and proceed with additional analyses, such as using regression models.

Feel free to reach out if you have any further questions.

Best,
Eunhwi

2023년 12월 8일 금요일 오후 4시 54분 38초 UTC+9에 law.cry...@gmail.com님이 작성:

Crystal Law

unread,
Dec 13, 2023, 11:48:27 PM12/13/23
to Eunhwi Lee, hbayesdm-users
Dear Eunhwi,

Thank you for confirming the feasibility of extracting posterior means for each individual for additional analyses!
I have proceeded with that already.

I have a follow-up question regarding the longitudinal analysis of our cohort study.
As you know, our first timepoint includes a significantly larger sample size (n=~1500) compared to the second timepoint (n=~120).
If I were to conduct the within-subject analysis as suggested, focusing only on individuals with data from both timepoints,
a substantial portion of the sample from the first timepoint would be excluded.

To retain the entire sample and conduct a comprehensive longitudinal analysis, I am considering an alternative approach:
Directly subtracting the parameter value of each individual at time 2 from their parameter value at time 1.
This would create a new variable representing the increase or decrease in said parameter.
I plan to use this variable as an independent variable in regression models, and this analysis will be limited to the male sample.

Would this approach be methodologically sound? 
Your feedback on this matter would be greatly appreciated, as it will significantly influence the direction of our analysis.

Thank you once again for your continued support and assistance.

Best regards,
Crystal





Eunhwi Lee

unread,
Dec 18, 2023, 10:00:01 PM12/18/23
to hbayesdm-users
Hi Crystal,

If I've understood correctly, are you planning to utilize the differences in parameter values between time 1 and 2? This approach seems to limit you to only 120 participants who took part in both sessions, causing the same problem of using the within-subject design. If that's the case, I believe employing a within-subject model design might be more effective.

Let me know if there's anything I've misunderstood or if you'd like to discuss further.

Best,
Eunhwi

2023년 12월 14일 목요일 오후 1시 48분 27초 UTC+9에 law.cry...@gmail.com님이 작성:

Crystal Law

unread,
Dec 18, 2023, 10:50:58 PM12/18/23
to Eunhwi Lee, hbayesdm-users
Hi Eunhwi,

Thanks for your consistent support on this.
Sorry about the confusion, we would like to use time 1 parameters value (large sample) to conduct cross-sectional analysis (as well as confirming the external validity of the parameters), followed by a subsample longitudinal analysis. 

Best regards
Crystal

Eunhwi Lee

unread,
Dec 18, 2023, 11:33:09 PM12/18/23
to hbayesdm-users
Hi Crystal,

Thanks for your quick response. You can indeed use the parameter as mentioned, for conducting cross-sectional analysis.
If you have any further questions or need additional clarification, please don't hesitate to reach out.

Best,
Eunhwi

2023년 12월 19일 화요일 오후 12시 50분 58초 UTC+9에 law.cry...@gmail.com님이 작성:

­이은휘 / 학생 / 심리학과

unread,
Jan 11, 2024, 8:22:32 PM1/11/24
to Crystal Law, hbayesdm-users
Hi Crystal,

Sorry for the delay in getting back to you. 
Regarding your suggestion to independently assess the validity of the parameters at T1 and T2, I agree that fitting the model separately for each time point seems like a viable approach.

As for the idea of directly subtracting the parameter values to create a ‘parameter change’ variable, it could be a feasible method only if the cohorts of 1200 participants and 120 participants are the same or similar. Since you are conducting hierarchical Bayesian modeling, the distributions of hyperparemters would be influenced by each participant's data, which would subsequently affect the individual parameter distributions as well. Given that your parameters are derived from different dataset and different sampling procedures, I recommend conducting within-subject modeling for the 120 participants or comparing the group characteristics included in each model fitting process.

I wish you the best in your research, and please feel free to ask if you need any further clarification or assistance.

Best,
Eunhwi

---------------------------------------------------------
Eunhwi Lee
Graduate Student
Computational Clinical Science Laboratory (https://ccs-lab.github.io/)
Department of Psychology
Seoul National University
email : lehls...@snu.ac.kr
---------------------------------------------------------

2023. 12. 19. 오후 1:55, Crystal Law <law.cry...@gmail.com> 작성:

Hi Eunhwi,

Thanks for the prompt reply - just to reconfirm, we could:
1. Run a hBayesDM analysis using Time 1 data  (n=~1200, all males) and get each cohort member's parameters (T1).
2. Explore the associations between these with other factors for research & validation purposes.
3. Run a separate hBayesDM analysis using Time 2 data  (n=~120, all males) and get each cohort member's parameters (T2), then validate the T2 parameters (external validity).
4. Directly subtracting the parameter values of each cohort member (T2-T1), resulting in a new variable "parameter change" representing the changes in said parameter.
5. Explore the associations between the "parameter change" and other factors for research purposes.

The reason why we are considering this approach rather than the within-subject modeling design is that, by doing so we would confirm the external validity of the parameters (by cross-sectional analysis) separately at T1 and T2,
while the development/trajectory of parameters is harder to validate in that sense.

Your help is much appreciated!

Best regards
Crystal


Reply all
Reply to author
Forward
0 new messages