[R-meta] Calculation of p values in selmodel
Will Hopkins
w|||thek|w| @end|ng |rom gm@||@com
Thu Mar 21 00:33:52 CET 2024
Thank you! Unfortunately I still get the warning...
Extra argument ('pval') disregarded.
...with every invocation of selmodel.
Here’s the line of code involving pval:
result <- metafor::selmodel(x, type="step", steps=(0.025), pval=meta_data$pValue)
It's reading the variable meta_data$pValue OK, because if I make it meta_data$junk, I get this:
There were 50 or more warnings (use warnings() to see the first 50)
Browse[1]> Q
> warnings()
Warning messages:
1: Unknown or uninitialised column: `junk`.
2: Extra argument ('pval') disregarded.
etc.
I closed R and reopened it, but still no joy. I had already restarted R prior to install.
-----Original Message-----
From: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org> On Behalf Of Viechtbauer, Wolfgang (NP) via R-sig-meta-analysis
Sent: Thursday, March 21, 2024 11:34 AM
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-project.org>
Cc: Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer using maastrichtuniversity.nl>
Subject: Re: [R-meta] Calculation of p values in selmodel
See: https://www.metafor-project.org/doku.php/installation#development_version
> -----Original Message-----
> From: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org>
> On Behalf Of Will Hopkins via R-sig-meta-analysis
> Sent: Wednesday, March 20, 2024 23:01
> To: 'R Special Interest Group for Meta-Analysis'
> <r-sig-meta-analysis using r- project.org>
> Cc: Will Hopkins <willthekiwi using gmail.com>
> Subject: Re: [R-meta] Calculation of p values in selmodel
>
> Wolfgang, I figured that I might be able to implement your
> selmodel(...,
> pval=dat$pValue) by reverting to for-loop processing. I solved the
> previous problems I had with this approach by stripping out the NULLs
> from the list objects, so the simulations are running nicely.
>
> However, it appears that the latest version of metafor, which I have
> just installed, does not have the pval functionality yet, because I
> get this warning with every invocation of selmodel:
> Extra argument ('pval') disregarded.
>
> I am still a newbie with R, so I may have done something wrong with
> the update process. I got this warning, and nine others like it, but I
> presume this doesn't apply to metafor:
> Warning: package 'boot' in library 'C:/Program
> Files/R/R-4.3.2/library' will not be updated.
>
> I then got this, again presumably irrelevant:
> Warning: cannot remove prior installation of package ‘lattice’
> Warning: restored ‘lattice’
>
> The only warning for loading metafor was this:
> package ‘Matrix’ was built under R version 4.3.3
>
> The other possibility is that my for-loop processing has some kind of
> mistake, but it seems to be OK. Each loop produces a meta-analysis
> object resultmeta from invocation of ram.uni with a dataset meta_data
> (the i-th subset of my full dataset). I then apply selmodel to
> resultmeta within a function, where the x is
> resultmeta:
> result <- metafor::selmodel(x, type="step", steps=(0.025),
> pval=meta_data$pValue)
>
> I give up. Help, please!
>
> Will
_______________________________________________
R-sig-meta-analysis mailing list @ R-sig-meta-analysis using r-project.org To manage your subscription to this mailing list, go to:
https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
More information about the R-sig-meta-analysis
mailing list