Skip to content

[R-meta] meta-regression: categorical

3 messages · Michael Dewey, P. Roberto Bakker

#
Hi Everybody,

I have a new question about meta-regression.
My database consists only of factors (no characters), so I suppose I do not
need 'factor()' in 'mods', i.e. 'mods = ~ factor-var'. I also tried 'mods =
~ factor(factor-var)' and I receive the same results as expected.
Only, there is one difference, 'mods = ~ factor-var' gives a warning
message:
*"In rma(measure = "SMCC", yi = yi, vi = vi, data = datsub, digits = 2,  :*
*  Redundant predictors dropped from the model."*
Whereas 'mods = ~ factor(factor-var)' does not give this message. What is
the reason for this?

So, my question is not why I receive this message, but why the difference:
with/out warning message.

Best regards,
Roberto
PS the same happens with a character variable: i.e. 'mods = ~ chr-var' as
well as 'mods = ~ factor(chr-var)'.

Op do 26 apr. 2018 om 07:42 schreef P. Roberto Bakker <
robertobakker at gmail.com>:

  
  
#
Dear Roberto

I suspect the answer is that your original factor variable has levels 
which do not appear in your data-set so they are dropped when the model 
matrix is formed.

If you do factor(already_existing_factor) it silently drops the levels. 
This is rather hidden in the documentation as the second paragraph of Value

Michael
On 06/01/2020 09:27, P. Roberto Bakker wrote:

  
    
  
2 days later
#
Dear Michael,

Thank you for you explanation.

Best wishes,
Roberto


Op ma 6 jan. 2020 om 17:37 schreef Michael Dewey <lists at dewey.myzen.co.uk>: