# - Fisher's z transformation of correlations
### Calculating the Effect of Falls on Hip Fracture at Different Ages and 95% Confidence Intervals  
Using the information derived above, we can calculate the effect of falls on hip fracture at different ages and their corresponding 95% confidence intervals using Equations (2) and (3). Additionally, we generate a plot of the rate ratio (RR) for hip fracture, comparing fallers versus non-fallers at various ages, by exponentiating the estimated \(\beta\) coefficients. To illustrate, we calculate the effect of falls on hip fracture for ages 50 to 90. First, we conduct a fixed-effect meta-analysis, followed by a random-effects meta-analysis. The following R code calculates the interaction effect of falls with age and the corresponding 95% confidence intervals, using Equations (2) and (3), based on the results of the fixed- and random-effects meta-analyses. library(ggplot2) library(ggpubr) plot_with_interaction <- function(age, b1, v1, b2, v2, r) { cov_b1b2 <- r * sqrt(v1 * v2) RR <- exp(b1 + b2 * age) RR_lower <- exp(b1+b2*age)-1.96 * sqrt(v1+age^2 * v2+2 * age*cov_b1b2)) RR_upper <- exp(b1+b2*age)+1.96*sqrt(v1+age^2 * v2+2*age*cov_b1b2)) ndata <- as.data.frame(cbind(RR, RR_lower, RR_upper, age)) ggplot(data = ndata, aes(x = age)) + geom_line(aes(y = RR)) + geom_line(aes(y = RR_lower), color = \"steelblue'', linetype = 'dashed'') + geom_line(aes(y = RR_upper), color = ''steelblue'', linetype = ''dashed'')+ scale_y_continuous(name = ''Rate Ratio (RR): Fallers vs. Non-Fallers'', limits = c(0, 4), expand = c(0, 0)) + theme_bw() + theme(axis.line = element_line(color = 'black''), axis.title.y = element_text(size = 8), axis.title.x = element_text(size = 8),axis.text.y = element_text(size = 8), axis.text.x = element_text(size = 8), plot.background = element_blank(), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.border = element_blank())  }  # Fixed-effect model  age <- seq(50, 90, 1)  b1 <- fixed_b1$'Overall beta'  v1 <- fixed_b1$'Overall variance'  b2 <- fixed_b2$'Overall beta'  v2 <- fixed_b2$'Overall variance'  r <- fixed_meta_r  p1 <- plot_with_interaction(age, b1, v1, b2, v2, r)  p1  # random-effects model  b1_rand <- random_b1$'Overall beta'  v1_rand <- random_b1$'Overall variance'  b2_rand <- random_b2$'Overall beta'  v2_rand <- random_meta_r  p2 <- plot_with_interaction(age, b1_rand, v1_rand, b2_rand, v2_rand, r_rand)  p2  p3 <- ggarrange(p1, p2, labels = c('A.Fixed Effect'', 'B.Random Effect''),  ncol = 2, nrow = 1) p3  
Figure 4 presents the hip fracture risk for fallers versus non-fallers at different ages, as determined by both fixed-effect (Figure 4A) and random-effects (Figure 4B) meta-analyses. For instance, in the fixed-effect meta-analysis, at 50 years old, the risk of hip fracture for fallers compared to non-fallers was HR = 1.6 (95 % CI: 0.88-2.92). The HR was calculated using Equation (2), where \(\hat{\beta}_{1}\)= 1.0404 (overall fixed effect) and \(\hat{\beta}_{2}\) = \(-0.0114\) (overall fixed effect). At age 50, the overall was calculated as \(\hat{\beta}\) = 1.0404 \(-\) 0.0114 \(\times\) 50 = 0.4701, and exponentiating the value of \(\hat{\beta}\), the overall RR was \(\exp(0.4701)\) = 1.6. Figure 4: Effect of falls on hip fracture at different ages, comparing fallers vs. non-fallers. The 95% confidence interval (CI) was computed using Equation (3). Since \(n\) is quite large, we approximated \(t_{n-p-1,n/2}\) as 1.96. The variance and covariance terms from the fixed-effect meta-analysis were as follows: var(\(\hat{\beta}_{1}\)) = 0.6848, var(\(\hat{\beta}_{2}\)) = 0.0001404, and cov(\(\hat{\beta}_{1}\), \(\hat{\beta}_{2}\)) = \(-\)0.009409 (from Equation 24). Substituting these into Equation (3), the 95% CI was calculated as 0.4701 \(\pm\) 1.96 \(\times\) \(\sqrt{0.6848+50^{2}\times 0.0001404-2\times 50\times 0.009409}\) = \((-0.1316,1.072)\). Exponentiating these limits gave the 95% CI for RR: 0.88 to 2.92. Similar calculations can be applied to obtain the RR and 95% CI for different ages, using both fixed-effect and random-effects meta-analyses.