'Hetstats are disappearing from forest plot after leftcols added

everyone! I'm totally novice in R data analysis and I faced the following problem, using meta package and metamean and forest functions:

datax

# A tibble: 12 x 8
   author  year   num  mean    sd   age   sex reg  
   <chr>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
 1 a       1991    39  22.8  10.4  35.4 0.667 EU   
 2 b       1992   239  22.4  10.8  50   0.63  EU   
 3 c       1993   154  34.6   6.6  46.8 0.423 EU   
 4 d       1994    81  21.3  13.2  46.8 0.42  EU   
 5 e       1995   145  31.3  11    45.2 0.669 EU   
 6 f       1996    30  21.2   9.8  45.6 0.5   US   
 7 g       1997    14  18.8   9.1  40.2 0.48  US   
 8 h       1998   135  20.5  11.8  40.7 0.36  US   
 9 i       1999    30  17.9   9.5  41.8 0.8   US   
10 j       2000    30  18.7   8.6  46   0.5   US   
11 k       2001    15  30.6   9.3  39.2 0.6   US   
12 l       2002    20  19.8  10.5  39.8 0.52  US 

m1 <- metamean(num, mean, sd, studlab=paste(author, year), data=datax)

forest(m1)

at this point everything if fine, we can see hetstats below the studlab list in left par

forest(m1, leftcols=c('author', 'year'))

after adding two (or even one, doesn't matter) leftcols, (any differing from 'studlab'), hestats are disappearing

I tried to change all the arguments in 'forest' function documentation - no result. Please, tell me, what am I doing wrong, and I'm really sorry if I didn't follow the forum rules writing it. I'm in despair. Thank you for attention



Solution 1:[1]

I had the same issue. The problem is that you did not add the "studlab" variable. If you include this one within the leftcols argument, the plot will show the hetstat variables like desired.

forest(m1, leftcols=c("studlab", "author", "year"))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Beat Moeckli