[R-meta] Meta analysis for identical multinomial logistic models
Viechtbauer, Wolfgang (SP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon Nov 16 15:25:22 CET 2020
Hi Ricardo,
For every model, you should be able to extract the model coefficients. There should be 2 coefficients for every explanatory variable (since your dependent variable has 3 categories) and for explanatory variables that are factors with more than 2 levels, the variable will actually be represented by multiple coefficients. But in any case, one should be able to extract those coefficients. Also, one should be able to extract the var-cov matrix of those coefficients. If 'res' is your list with the 2000 models, maybe b <- lapply(res, coef) and V <- lapply(res, vcov) may provide these, but I don't know what you are using for fitting the multinomial models so I cannot try this out.
lapply(res, coef) still gives you a list, which you will want to turn into a vector (try b <- unlist(b)). You then would want to create a corresponding vector with 'player ids' and 'variable ids'. You could then meta-analyze the coefficients with:
rma.mv(b, V, mods = ~ factor(variable.id) - 1, random = ~ factor(variable.id) | player.id, struct="UN", sparse=TRUE, verbose=TRUE)
This could take a while (so setting verbose=TRUE to see the progress) and sparse=TRUE because that should help to speed up model fitting here.
In essence, you are doing a two-step multilevel analysis in this way. An example from a different context is provided here:
http://www.metafor-project.org/doku.php/tips:two_stage_analysis
One could also fit a single multilevel multinomial model.
Best,
Wolfgang
>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org]
>On Behalf Of Ricardo de Boer
>Sent: Monday, 16 November, 2020 14:27
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] Meta analysis for identical multinomial logistic models
>
>Dear community,
>
>I was wondering if it is possible to use the metafor package for a
>meta analysis on the results I achieved from multiple multinomial
>models.
>These multinomial models are all identical in the sense that they have
>the same explanatory variables. The difference lies in the input data
>that is used.
>Every model has data from 1 individual, where the dataset varies much
>in the amount of observations per model. The goal is to investigate
>whether these individuals behave differently.
>
>To be more precise, I am using baseball data per pitch from 2008-2019
>to try and investigate if the strategies differ among pitchers and
>which factors contribute to these differences.
>The dependent variable is categorical with the values 'Fastball',
>'Breakingball' and 'Changeup'.
>For every pitcher, I ran the same multinomial model with fixed
>effects. Just to name a few explanatory varaibles: count (factor
>variable with amount of pitches and balls), the number of outs before
>the pitch took place, if the pitcher is left/right handed.
>
>At the moment, I have more than 2000 multinomial models where the
>output summary is saved in a list.
>Is it possible to use the package 'metafor' for my purpose? If so, how
>would my next steps look like?
>I have difficulty understanding how I would use the baseball data and
>the output summary from my multinomial models with fixed effects
>together with the metafor package.
>
>Any assistance is much appreciated.
>
>Ricardo
More information about the R-sig-meta-analysis
mailing list