[R-meta] Wald_test error

Cátia Ferreira De Oliveira cm|o500 @end|ng |rom york@@c@uk
Wed Aug 11 14:32:46 CEST 2021


Dear Michael,

I finally see what you meant by your question. I did not realise we now had
to provide a matrix for the constraints.
If you want to test the overall effect of a variable with three groups,
which constraints would you use? Do you have any good resources on how to
do it?
Should it be c(1,1,1,0,0,0) because you would be contrasting the group
levels and not interested in the interactions?

Group.model<- robu(formula = yi ~ 0 + Group+ Group:Variable, data = Data,
studynum = Study, var.eff.size = vi,  rho = .8, small = TRUE)
print(Group.model)

Wald_test(Group.model, constraints = ?, vcov = "CR2")

Best wishes,

Catia

On Tue, 10 Aug 2021 at 14:42, Cátia Ferreira De Oliveira <cmfo500 using york.ac.uk>
wrote:

> Dear Michael.
>
> I am not sure, I just ran it as it was presented in the blogpost.
>
> Best wishes,
>
> Catia
>
> On Tue, 10 Aug 2021 at 14:08, Michael Dewey <lists using dewey.myzen.co.uk>
> wrote:
>
>> Dear Cátia
>>
>> Is constraints allowed to be a vector rather than a matrix?
>>
>> Michael
>>
>> On 10/08/2021 12:39, Cátia Ferreira De Oliveira wrote:
>> > Dear all,
>> >
>> > I have tried to run the code in this post:
>> > https://www.jepusto.com/clubsandwich-for-rve-meta-analysis/
>> >
>> > *options(width=150)*
>> > *library(robumeta)*
>> > *library(clubSandwich)*
>> >
>> >
>> > *data(dropoutPrevention)*
>> >
>> >
>> >
>> > *m3_robu <- robu(LOR1 ~ study_design + attrition + group_equivalence +
>> > adjusted*
>> > *                + outcome + evaluator_independence*
>> > *                + male_pct + white_pct + average_age*
>> > *                + implementation_quality + program_site + duration +
>> > service_hrs, *
>> > *                data = dropoutPrevention, studynum = studyID,
>> var.eff.size
>> > = varLOR, *
>> > *                modelweights = "HIER")*
>> > *print(m3_robu)*
>> >
>> >
>> > *Wald_test(m3_robu, constraints = 10:12, vcov = "CR2")*
>> >
>> >
>> > But it gives me the following error when I run the Wald_test:
>> >
>> >
>> >
>> > *Error in if (!inherits(constraints, "matrix") | ncol(constraints) !=
>> p) {
>> > :   argument is of length zero*
>> >
>> > Does anyone know why this is happening?
>> >
>> > Best wishes,
>> >
>> > Catia
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > R-sig-meta-analysis mailing list
>> > R-sig-meta-analysis using r-project.org
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>> >
>>
>> --
>> Michael
>> http://www.dewey.myzen.co.uk/home.html
>>
>
>
> --
> Cátia Margarida Ferreira de Oliveira
> Psychology PhD Student
> Department of Psychology, Room B214
> University of York, YO10 5DD
> pronouns: she, her
>


-- 
Cátia Margarida Ferreira de Oliveira
Psychology PhD Student
Department of Psychology, Room B214
University of York, YO10 5DD
pronouns: she, her

	[[alternative HTML version deleted]]



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