Skip to content

[R-meta] Wald_test error

4 messages · James Pustejovsky, Cátia Ferreira De Oliveira, Philippe Tadger

#
Please keep the list cc'd. Responses below.

James

On Fri, Aug 13, 2021 at 9:56 AM C?tia Ferreira De Oliveira <
cmfo500 at york.ac.uk> wrote:

            
To answer this question, we need to know what the null hypothesis of
interest is. In the model as you've specified it, the definition of the
group effects depends on how you specify the contrasts for the Component
term. As a result, it's not clear what the main effects of the Group term
mean. Could state in words what hypothesis you're trying to test?
diagonal constraint matrix (as you've specified) will test the null that
the average effect size is equal to zero for each of three levels of
Variable. That might be of interest, or perhaps you instead want to test
whether the average effect sizes are *identical* across the three levels of
Variable (but not necessarily all zero). For the latter null, you would
instead use

constraints = constrain_equal(1:3)

or

constraints = constrain_equal("Variable", reg_ex = TRUE)
#
Dear James,

Apologies for not adding the mailing list to the email.
I am planning many contrasts, they could be accomplished by subgrouping the
data but not sure if that's a good approach. What I am aiming to accomplish
is to determine whether there are
a) any differences between the TD group and DD/DLD groups for grammar,
vocabulary and phonology;
b) comparing whether the effect for grammar, phonology and vocabulary == 0;
c) pairwise comparisons of the effect for grammar, phonology and vocabulary
to see if they are different;
d) check whether the correlation is different from 0 for the reference
level (TD) for each component - grammar, vocabulary, phonology (not sure if
I would need to run a different model for this one).

The reference level is the TD group, there are three groups (TD, DD and
DLD) and three components (grammar, vocabulary and phonology).


*component <- robu(formula = yi ~ 0 + Component + Group:Component, data =
df,*
*                       studynum = Study, var.eff.size = vi,*
*                       rho = .8, small = TRUE)*
*print(component)*


*RVE: Correlated Effects Model with Small-Sample Corrections*

*Model: yi ~ 0 + Component + Group:Component*



*Number of studies = 34 *
*Number of outcomes = 305 (min = 1 , mean = 8.97 , median = 4 , max = 48 )*
*Rho = 0.8 *
*I.sq = 47.09732 **Tau.sq = 0.02458387 *


*                               Estimate StdErr t-value   dfs P(|t|>) 95%
CI.L 95% CI.U Sig*
*1             ComponentGrammar  0.05897 0.0456   1.293 11.45  0.2217
 -0.0410   0.1589    *
*2           ComponentPhonology -0.00383 0.0356  -0.108  8.05  0.9169
 -0.0857   0.0781    *
*3          ComponentVocabulary  0.09662 0.0592   1.631  5.35  0.1600
 -0.0527   0.2460    *
*4     ComponentGrammar.GroupDD  0.03277 0.0590   0.555  1.05  0.6740
 -0.6412   0.7068    *
*5   ComponentPhonology.GroupDD  0.01557 0.0929   0.168  5.60  0.8728
 -0.2159   0.2470    *
*6  ComponentVocabulary.GroupDD -0.16516 0.0592  -2.788  5.35  0.0358
 -0.3145  -0.0158  ***
*7    ComponentGrammar.GroupDLD -0.08097 0.0819  -0.989 14.99  0.3386
 -0.2556   0.0936    *
*8  ComponentPhonology.GroupDLD  0.35854 0.1760   2.037  5.77  0.0897
 -0.0763   0.7934   **
*9 ComponentVocabulary.GroupDLD -0.10642 0.0692  -1.537  9.94  0.1555
 -0.2608   0.0480    *

*---*
*Signif. codes: < .01 *** < .05 ** < .10 **
*---*
*Note: If df < 4, do not trust the results*



Thank you! I am a bit new to using the constraints.

Best wishes,

Catia
On Sun, 15 Aug 2021 at 03:38, James Pustejovsky <jepusto at gmail.com> wrote:

            

  
    
#
Dear colleges

In a batch of a several MA (simulation kind) I would like to capture the 
error messages (like non-convergence)? from functions like 
mada::reitsma. I have been exploring the function tryCatch but without 
been able to capture the error messages. Something like this

X.mada<-vector("list",745)
for (iii in 1:200) {
X.mada[iii]<-tryCatch(mada::reitsma(data=subset(X,SUBMA_num==iii), 
correction.control="single", correction=0.5))
}

Ideally X.mada will store convergence and non-convergence messages.

Thanks in advance for the support!
#
I find the functions safely() and possibly() from the purrr package for
this sort of error handling stuff. For instance, create

safe_reitsma <- safely(mada::reitsma)

Then run

X_mada <- safe_reitsma(data=subset(X,SUBMA_num==iii),
correction.control="single", correction=0.5)

The result will always have two components, X_mada$result and X_mada$error.
Further details and examples here:
https://purrr.tidyverse.org/reference/safely.html

James

On Sun, Aug 15, 2021 at 5:57 PM Philippe Tadger <philippetadger at gmail.com>
wrote: