centroidMethod | R Documentation |
Estimate point estimates and standard errors from multiple data points reported in primary literature. This is particularly useful for backcalculating odds ratios and confidence intervals for meta-analysis. Although simple back-calculation methods exist, they do not always create estimates that are consistent with the reported values. For instance, consider the example of an odds ratio of 1.3, with a 95% confidence interval of 1.1 to 1.7; the back calculation methods do not forward calculate the correct decimal places (see Examples
). The current method creates an area of potential values for the log(OR) and SE, and iteratively tests a series of discrete points for compliance with the rounding constraints; the centroid of the compliant values is calculated, returning the point estimate and standard error.
centroidMethod(input,
decimals = NULL,
resolution = 250,
type = "OR",
distribution = "z",
df = NULL,
plot = FALSE,
ci = 95,
pInfo = NULL)
input |
input data as c(PE,LCL,UCL), where PE is the point estimate as OR, log(OR),beta, or mean. Values can be entered as character or numeric. Character entry is particularly useful if there are trailing zeros and the number of decimal places is not specified in |
decimals |
specifies the number of decimal places for calculating rounding error. |
resolution |
a number that divides the possible standard error and point estimate spaces. The higher the number, the greater the precision of the centroid estimate and the greater the processing time. High resolution numbers will make |
type |
specifies the type of |
distribution |
select the distribution to be used to calculate and back-calculate the 95% confidence intervals. Legal values are "z" and "t". If |
df |
degrees of freedom (numeric). Required if |
plot |
logical for whether to plot a figure that shows the possible standard error and point estimate ranges tested, the plane of values that satisfy all model criteria, and each of the four estimates (SE from the lower and upper confidence intervals, the average SE, and the current centroid method). |
ci |
an integer between 0 and 100 that specifies the confidence interval (e.g., 95% confidence interval, which is the default, would be entered as 95). |
pInfo |
a vector of three values: the reported p-value, the number of decimal places, and the p-value function. For example, for a study that reported p<0.05, the data would be c(0.05,2,"<"); for a study that reported p=0.020, the data would be c(0.020,3,"=="). |
The returned object is a data.frame with two columns: type
and SE.
Andrew W Brown John A Dawson
Brown and Dawson. Method for synthesizing multiple reported values to calculate point estimates and standard errors from reported point estimates, 95% confidence intervals, and p-values. In progress.
centroidMethod(input = c(1.3,1.1,1.7), #Odds ratio of 1.3, 95% CI: 1.1, 1.7
decimals = NULL, #let the function determine decimal places
resolution = 250, #grid of 250 x 250 points
type = "OR", #Odds ratio
distribution = "z", #assume z distribution
df = NULL, #z distribution, so no df
plot = TRUE, #plot the output
ci = 95, #95% CI
pInfo = NULL #No p-value reported
)
centroidMethod(input = c(1.3,1.1,1.7), #Odds ratio of 1.3, 95% CI: 1.1, 1.7
decimals = NULL, #let the function determine decimal places
resolution = 250, #grid of 250 x 250 points
type = "OR", #Odds ratio
distribution = "z", #assume z distribution
df = NULL, #z distribution, so no df
plot = TRUE, #plot the output
ci = 95, #95% CI
pInfo = c(0.02,2,"<") #p-value reported as range
)
centroidMethod(input = c(1.3,1.1,1.7), #Odds ratio of 1.3, 95% CI: 1.1, 1.7
decimals = NULL, #let the function determine decimal places
resolution = 250, #grid of 250 x 250 points
type = "OR", #Odds ratio
distribution = "z", #assume z distribution
df = NULL, #z distribution, so no df
plot = TRUE, #plot the output
ci = 95, #95% CI
pInfo = c(0.011,3,"==") #p-value reported rounded to 3 decimals
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.