Description Usage Arguments Details Value Examples

View source: R/ConfidenceIntervalCalibration.R

Fit a systematic error model

1 2 | ```
fitSystematicErrorModel(logRr, seLogRr, trueLogRr,
estimateCovarianceMatrix = TRUE)
``` |

`logRr` |
A numeric vector of effect estimates on the log scale. |

`seLogRr` |
The standard error of the log of the effect estimates. Hint: often the standard error = (log(<lower bound 95 percent confidence interval>) - log(<effect estimate>))/qnorm(0.025). |

`trueLogRr` |
A vector of the true effect sizes. |

`estimateCovarianceMatrix` |
should a covariance matrix be computed? If so, confidence intervals for the model parameters will be available. |

Fit a model of the systematic error as a function of true effect size. This model is an extension of the method for fitting the null distribution. The mean and log(standard deviations) of the error distributions are assumed to be linear with respect to the true effect size, and each component is therefore represented by an intercept and a slope.

An object of type `systematicErrorModel`

.

1 2 3 | ```
controls <- simulateControls(n = 50 * 3, mean = 0.25, sd = 0.25, trueLogRr = log(c(1, 2, 4)))
model <- fitSystematicErrorModel(controls$logRr, controls$seLogRr, controls$trueLogRr)
model
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.