| Title: | Pool Literature-Based and Individual Participant Data Based Spline Estimates |
|---|---|
| Description: | Pooling estimates reported in meta-analyses (literature-based, LB) and estimates based on individual participant data (IPD) is not straight-forward as the details of the LB nonlinear function estimate are not usually reported. This package pools the nonlinear IPD dose-response estimates based on a natural cubic spline from lm or glm with the pointwise LB estimates and their estimated variances. Details will be presented in Härkänen, Tapanainen, Sares-Jäske, Männistö, Kaartinen and Paalanen (2026) "Novel pooling method for nonlinear cohort analysis and meta-analysis estimates: Predicting health outcomes based on climate-friendly diets" Epidemiology <doi:10.1097/EDE.0000000000001932>. |
| Authors: | Tommi Härkänen [aut, cre] |
| Maintainer: | Tommi Härkänen <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.1 |
| Built: | 2026-05-12 08:16:42 UTC |
| Source: | https://github.com/cran/metasplines |
Title Pool meta-analysis estimates and estimates from a regression model.
pool_all_splines(v, meta.df, glm.res)pool_all_splines(v, meta.df, glm.res)
v |
Name of the covariate, which is modeled using an nsk spline. |
meta.df |
Meta-analysis estimates: dataframe with columns variable (covariate name), est (log HR estimate), est.var (estimated variance) and cov.value (covariate values where est and est.var were reported). |
glm.res |
Regression analysis result object. |
List containing pooled estimates of the spline parameters.
# Estimate a linear regression model using an individual participant data (IPD): library(metasplines) library(splines2) res <- lm( Petal.Width ~ Species + nsk(Sepal.Length, Boundary.knots = c(4.5, 7.5), knots = c(5, 6, 6.5)), data=iris) # "Literature-based" (LB) estimates: lb.df <- read.table(text= "variable, cov.value, est, est.var Sepal.Length, 4.5, 0, 0 Sepal.Length, 5, 0.15, 0.01 Sepal.Length, 5.5, 0.25, 0.01 Sepal.Length, 6, 0.4, 0.01 Sepal.Length, 6.5, 0.5, 0.01 Sepal.Length, 8, 0.25, 0.04 ", sep=",", header=TRUE) # Output table with the point estimates and the estimated variances: pool_splines(v="Sepal.Length", meta.df=lb.df, glm.res=res)# Estimate a linear regression model using an individual participant data (IPD): library(metasplines) library(splines2) res <- lm( Petal.Width ~ Species + nsk(Sepal.Length, Boundary.knots = c(4.5, 7.5), knots = c(5, 6, 6.5)), data=iris) # "Literature-based" (LB) estimates: lb.df <- read.table(text= "variable, cov.value, est, est.var Sepal.Length, 4.5, 0, 0 Sepal.Length, 5, 0.15, 0.01 Sepal.Length, 5.5, 0.25, 0.01 Sepal.Length, 6, 0.4, 0.01 Sepal.Length, 6.5, 0.5, 0.01 Sepal.Length, 8, 0.25, 0.04 ", sep=",", header=TRUE) # Output table with the point estimates and the estimated variances: pool_splines(v="Sepal.Length", meta.df=lb.df, glm.res=res)
Title Pool meta-analysis estimates and estimates from a regression model.
pool_splines( v, meta.df, glm.res, cor.m = NULL, x.range = NULL, full.output = FALSE )pool_splines( v, meta.df, glm.res, cor.m = NULL, x.range = NULL, full.output = FALSE )
v |
Name of the covariate, which is modeled using an |
meta.df |
Meta-analysis estimates: dataframe with columns |
glm.res |
Regression analysis result object. |
cor.m |
Assumed correlation matrix. If NULL (default) or NA then use correlation matrix from |
x.range |
If NULL (default), then take the range from |
full.output |
If TRUE then output also the log HR values and 95% confidence intervals over a grid of covariate values. |
List containing pooled estimates of the spline parameters.