Meta-analysis with metafor package in R

91 views Asked by At

I am encountering difficulties while attempting to display the incidence rates per 100,000 as my effect size variable on a forest plot. The logged-transformed rates are being displayed correctly, including the pooled estimate. However, when trying to display the actual (exponentiated) rates, the plot shows only zeros.

The range of the actual rates is substantial, spanning from 11 to 500, varying across world regions. I have attempted sub-grouping to show each age-group across regions, and I've set the following parameters in the forest plot:


forest(result1,
       atransf = exp, # Apply exponential transformation to the model estimates
       refline = log(1), # Reference line for no effect
       xlab = "Incidence Rate per 100,000", # Label for the x-axis
       xlim = c(0, max(df_sub$exp_upper_ci) * 1.1), # Set limits to include the max upper CI
   slab = paste(df_sub$study_ID_years, df_sub$age_group, sep = ": ") # Study labels
)

Despite these adjustments, the issue persists. My concern is whether I can effectively display the actual or exponentiated estimates given the ranges of the actual rates, lower and upper limits of the confidence intervals


summary(df_aggregated_year_grp1$exp_rate)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  11.44   45.10   82.70  144.61  152.78  539.53 
summary(df_aggregated_year_grp1$exp_lower_ci)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  7.689  33.510  49.464  93.501  93.739 387.612 
summary(df_aggregated_year_grp1$exp_upper_ci)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  17.02   72.32  133.07  236.24  341.38  750.99 

the ranges are as shown above, and tried the forest plot on the logged-transformed rates and worked correctly:


result1 <- rma(yi = log_rate, sei = se_log_rate, data = df_aggregated_year_grp1, method = "REML")
forest(result1, refline = 0, xlab = "Log Rate", slab = df_aggregated_year_grp1$study_ID_years)

and I expected that forest can also display the actual (exponentiated) estimates that are used in the model such as, this could work also:


forest(result1, 
       atransf=exp,  # Apply exponential transformation
       xlab="Incidence Rate per 100,000",  # Updated label for the x-axis
       xlim=c(0, max(df_aggregated_year_grp1$exp_upper_ci)),  # Adjust the x-axis limits to fit the range of the exponentiated values
       slab=paste(df_aggregated_year_grp1$study_ID_years, df_aggregated_year_grp1$age_group, sep=": "),
       cex=0.7) 

but it showed only zeros in the plot, as in the attached pics.

I appreciate any insights or suggestions to resolve this issue.

Many thanks in advance! Abeer!

image 1

enter image description here

image 2

enter image description here

1

There are 1 answers

0
Wolfgang On BEST ANSWER

I don't quite understand which of your two images correspond to the code you posted, but in essence, but as far as I can tell (without a reproducible example) the problem stems from you setting xlim to values that don't make sense in the context of these data. First, run print(forest(...)) without setting xlim and check what the default values are for this argument. Then adjust as needed to improve the look of the plot.