American-Institutes-for-Research / WeMix

WeMix public repository
GNU General Public License v2.0
10 stars 2 forks source link

User specified-variance covariance trait matrix #5

Closed bstpourcain closed 1 year ago

bstpourcain commented 2 years ago

Hi, We really enjoyed reading and looking into your WeMix package. We were wondering whether it would be possible to a) Include a user specified-variance covariance trait matrix b) as this is user-specified, implement some bootstrapping to adjust SEs Do you think this is possible? Best wishes, Beate

pdbailey0 commented 2 years ago

@bstpourcain thank you for your interest in WeMix.

For (a) I'm unsure what you are asking. You can specify a variety of covariance structures using the same syntax as lme4. See section 2 of this paper. Does that help?

for (b) I'm also somewhat unsure what you are asking for. Is there a paper or package that you know of that does what you are interested in for the unweighted case?

bstpourcain commented 2 years ago

Dear Paul,

Thanks for the link, very helpful. I will look into this. We would like to supply a fixed Z, as we have measures to estimate directly overlap between observations. However, it might be

possible to feed this in also as a residual matrix. Do you think this is possible?

Best wishes,

Beate

Beate St Pourcain, PhD

Senior Investigator & Group Leader

Max Planck Institute for Psycholinguistics | Wundtlaan 1 | 6525 XD Nijmegen | The Netherlands

@bstpourcain

Tel: <tel:+31%2024%20352%201964> +31 24 3521964

Fax: <tel:+31%2024%20352%201213> +31 24 3521213

ORCID: https://orcid.org/0000-0002-4680-3517 https://orcid.org/0000-0002-4680-3517

Web: https://www.mpi.nl/departments/language-and-genetics/projects/population-variation-and-human-communication/

Further affiliations with:

MRC Integrative Epidemiology Unit | University of Bristol | UK

Donders Institute for Brain, Cognition and Behaviour | Radboud University | The Netherlands

My working hours may not be your working hours. Please do not feel obligated to reply outside of your normal working schedule.

[edited by PB to delete the previous post that was automatically included in reply]

pdbailey0 commented 2 years ago

@bstpourcain, is there a specification you cannot get with the existing formula method? WeMix requires the random effects to be entirely nested because it is designed for survey weights and surveys have this property.

bstpourcain commented 2 years ago

Dear Paul,

We aim to use summary statistics as predictors and outcome and for that we need to correct for sample overlap (that we can estimate), unless we ensure that predictors and outcome are fully unrelated. The latter is also possible but trickier. Thus, we would like to feed in Z, as we can estimate overlap for groups of observations.

Any thoughts, please let me know.

Many thanks,

Beate

Beate St Pourcain, PhD

Senior Investigator & Group Leader

Max Planck Institute for Psycholinguistics | Wundtlaan 1 | 6525 XD Nijmegen | The Netherlands

@bstpourcain

Tel: <tel:+31%2024%20352%201964> +31 24 3521964

Fax: <tel:+31%2024%20352%201213> +31 24 3521213

ORCID: https://orcid.org/0000-0002-4680-3517 https://orcid.org/0000-0002-4680-3517

Web: https://www.mpi.nl/departments/language-and-genetics/projects/population-variation-and-human-communication/

Further affiliations with:

MRC Integrative Epidemiology Unit | University of Bristol | UK

Donders Institute for Brain, Cognition and Behaviour | Radboud University | The Netherlands

My working hours may not be your working hours. Please do not feel obligated to reply outside of your normal working schedule.

From: Paul Bailey @.> Sent: Thursday, 11 August 2022 17:46 To: American-Institutes-for-Research/WeMix @.> Cc: St Pourcain, Beate @.>; Mention @.> Subject: Re: [American-Institutes-for-Research/WeMix] User specified-variance covariance trait matrix (Issue #5)

@bstpourcain https://github.com/bstpourcain , is there a specification you cannot get with the existing formula method? WeMix requires the random effects to be entirely nested because it is designed for survey weights and surveys have this property.

— Reply to this email directly, view it on GitHub https://github.com/American-Institutes-for-Research/WeMix/issues/5#issuecomment-1212167721 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWM3JGGWCDHOTQEGJBDXOTVYUN4LANCNFSM56FBZ6SQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ALWM3JE3K7PKMK34V5J5NZ3VYUN4LA5CNFSM56FBZ6S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJBADMKI.gif Message ID: @.***>

pdbailey0 commented 2 years ago

@bstpourcain I think the Z matrix formation in WeMix::mix is sufficiently flexible to allow you to specify what you're describing. You can, for example, specify a "random slope" term that you specify. That should allow you to put in an arbitrary Z column of your choice. If you're interested in mixed models in R the r-sig-mixed-models mailing group may be a good resource for you.

Because WeMix::mix accepts inputs in the same format as lme4::lmer many people should be able to help you there.

bstpourcain commented 2 years ago

Hi Paul,

Thanks for the great suggestions, yes, I would like to join the group. For my purposes, I need to incorporate a lower diagonal k x k Z matrix, with diagonals, for the k groups that indicate the inflation. An intercept would already great, and actually be preferred.

Have a nice weekend,

Beate

Beate St Pourcain, PhD

Senior Investigator & Group Leader

Max Planck Institute for Psycholinguistics | Wundtlaan 1 | 6525 XD Nijmegen | The Netherlands

@bstpourcain

Tel: <tel:+31%2024%20352%201964> +31 24 3521964

Fax: <tel:+31%2024%20352%201213> +31 24 3521213

ORCID: https://orcid.org/0000-0002-4680-3517 https://orcid.org/0000-0002-4680-3517

Web: https://www.mpi.nl/departments/language-and-genetics/projects/population-variation-and-human-communication/

Further affiliations with:

MRC Integrative Epidemiology Unit | University of Bristol | UK

Donders Institute for Brain, Cognition and Behaviour | Radboud University | The Netherlands

My working hours may not be your working hours. Please do not feel obligated to reply outside of your normal working schedule.

From: Paul Bailey @.> Sent: Friday, 12 August 2022 21:47 To: American-Institutes-for-Research/WeMix @.> Cc: St Pourcain, Beate @.>; Mention @.> Subject: Re: [American-Institutes-for-Research/WeMix] User specified-variance covariance trait matrix (Issue #5)

@bstpourcain https://github.com/bstpourcain I think the Z matrix formation in WeMix::mix is sufficiently flexible to allow you to specify what you're describing. You can, for example, specify a "random slope" term that you specify. That should allow you to put in an arbitrary Z column of your choice. If you're interested in mixed models in R the r-sig-mixed-models mailing group https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models may be a good resource for you.

Because WeMix::mix accepts inputs in the same format as lme4::lmer many people should be able to help you there.

— Reply to this email directly, view it on GitHub https://github.com/American-Institutes-for-Research/WeMix/issues/5#issuecomment-1213459593 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWM3JHPEA5TLR26R5ZPHRLVY2SZVANCNFSM56FBZ6SQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ALWM3JDQDRPGZ6VV5WLQD3TVY2SZVA5CNFSM56FBZ6S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJBJ6ZCI.gif Message ID: @. @.> >

pdbailey0 commented 1 year ago

It seems this is complete so I'm closing it.