[R-meta] Extracting values from a list of confint() objects

Will Hopkins w|||thek|w| @end|ng |rom gm@||@com
Sun Mar 10 05:58:13 CET 2024


With the help of ChatGPT, I have managed to extract values from a list of
rma() objects and values from a list of selmodel() objects derived from the
list of rma() objects. However, I cannot extract values from a list of
confint() objects derived from the selmodel() objects. I hope I am using the
right jargon here. If not, please be gentle, as I am still on the steep part
of the learning curve.

 

For example, this code (mysteriously) extracts tau2 from meta_results, which
is a list of rma objects:

tau2 <- sapply(meta_results, function(x) x$tau2).

 

And this code (equally mysteriously) extracts the SE of tau2 from
adjusted_meta, which is a list of selmodel objects derived by applying
selmodel() to meta_results:

seltau2se <- sapply(adjusted_meta, function(x) x$se.tau2).

 

But I have a list I have called adjusted_confint, which is a list of confint
objects derived by applying confint to the list adjusted_meta. I don't know
how to use sapply on this list to extract the confidence limits for tau2
that are contained within this list. I have "copied blindly" the syntax of
the other sapply statements without success. Basically I don't know what to
put for the x$..., and everything I have tried fails. ChatGPT was not
helpful here. I hope a real maven can help here. Thanks.

 

Will


	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list