drizopoulos / GLMMadaptive

GLMMs with adaptive Gaussian quadrature
https://drizopoulos.github.io/GLMMadaptive/
60 stars 14 forks source link

weights in mixed_model()? #6

Closed strengejacke closed 5 years ago

strengejacke commented 5 years ago

Is it possible to use weights in mixed_model()? I haven't found anything in the help files.

drizopoulos commented 5 years ago

No, weights have not been implemented yet. Do you want to use them for specific purposes?

On 1/21/2019 5:54 PM, Daniel wrote:

Is it possible to use weights in |mixed_model()|? I haven't found anything in the help files.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdrizopoulos%2FGLMMadaptive%2Fissues%2F6&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ce0c13d08228d41ef762708d67fc11b24%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C1%7C636836864694431260&sdata=1R8F2tCsgqSzgETnBrzH9QdbQhn9iKeLqLvl%2BQ0PYIo%3D&reserved=0, or mute the thread https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMn5z9FUcikfV1iY8YNkiokURJ7CJLK1ks5vFfDCgaJpZM4aLM0a&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ce0c13d08228d41ef762708d67fc11b24%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C1%7C636836864694431260&sdata=QTGRtM2UDd%2B7Hx35gzmj6gRL8m05deAXrirtzRw1K40%3D&reserved=0.

-- Dimitris Rizopoulos Professor of Biostatistics Department of Biostatistics Erasmus University Medical Center

Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands Tel: +31/(0)10/7043478 Fax: +31/(0)10/7043014 Web (personal): http://www.drizopoulos.com/ Web (work): http://www.erasmusmc.nl/biostatistiek/ Blog: http://iprogn.blogspot.nl/

strengejacke commented 5 years ago

Sometimes, e.g. in case of panel attrition, we use response propensity weights in our models. Or in case of analyzing survey-data, you may have a weighting-variable that can be used in standard regression or mixed models, without the need for a specific survey design.

strengejacke commented 5 years ago

Two surveys come to my mind where weights are required, e.g. when using mixed models to analyse the data: European Social Survey and German Ageing Survey.

Would you say it's difficult to implement such a feature?

drizopoulos commented 5 years ago

A weights argument has been added in mixed_model(). These are simple multipliers on the log-likelihood contributions of each group/cluster, i.e., we presume that there are multiple replicates of each group/cluster denoted by the weights.

strengejacke commented 5 years ago

btw, you have changed the structure of how the model frames (like x$model_frames$mfX_zi) are saved in MixMod-objects with the last update? Is there a reason for this?

drizopoulos commented 5 years ago

Yes, because I’m working on the extension to nested random effects.

From: Daniel notifications@github.com Sent: Friday, June 28, 2019 11:57 AM To: drizopoulos/GLMMadaptive GLMMadaptive@noreply.github.com Cc: D. Rizopoulos d.rizopoulos@erasmusmc.nl; State change state_change@noreply.github.com Subject: Re: [drizopoulos/GLMMadaptive] weights in mixed_model()? (#6)

btw, you have changed the structure of how the model frames (like x$model_frames$mfX_zi) are saved in MixMod-objects with the last update? Is there a reason for this?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdrizopoulos%2FGLMMadaptive%2Fissues%2F6%3Femail_source%3Dnotifications%26email_token%3DADE7TT7DTG32G6IQIJSS6BTP4XN53A5CNFSM4GRMZUNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYZUSUI%23issuecomment-506677585&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7C98ff4b40e866447fb09208d6fbaeeebc%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C636973126082271332&sdata=buSGpJ1dP0Quz44f%2BHDXZfsIfjb%2F%2BL%2BpvEiCGFD39Ao%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TTZP25F5Z336HYX5BH3P4XN53ANCNFSM4GRMZUNA&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7C98ff4b40e866447fb09208d6fbaeeebc%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C636973126082281336&sdata=eq6nsdhgM14kvA9bq5xUp8nMO%2F1955GDMxu1IgdlxT8%3D&reserved=0.

strengejacke commented 5 years ago

ok, thanks! It broke the insight pkg on CRAN, but the issue is already fixed and I'm planning to submit soon.