Description Usage Arguments Details Value Author(s) References Examples
predict.rrma
returns predicted values and error
from robust variance meta-regression models
1 2 3 |
object |
A meta-regression object of class
|
newdata |
Optional new data frame |
se.fit |
A switch indicating if standard errors are required. |
na.action |
function determining what should be done
with missing values in |
level |
Tolerance/confidence interval |
interval |
Return a confidence interval? |
predict.rrma is used to generate new predicted variables and error from a data set. Note that incorporating study and data point level variation is not yet implemented.
For prediction without standard errors: a vector with
predicted values; for prediction with standard errors: a
list with predicted values and standard error values;
four prediction with confidence intervals: a data frame
with the column names fit, lwr, upr
.
Jarrett Byrnes and Sean Anderson
Hedges, L.V., Tipton, E. & Johnson, M.C. (2010). Robust variance estimation in meta-regression with dependent effect_size estimates. Res. Synth. Method., 1, 39-65.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(broad)
m <- rrma(formula = lnorReg ~ d18OresidualMean.cent, data =
broad, study_id = study.ID, var_eff = vlnorReg, rho = 0.5)
pred <- predict(m, interval = "confidence")
plot(lnorReg ~ d18OresidualMean.cent, data=broad)
matplot(broad$d18OresidualMean.cent, pred$fit, col="red", lwd=2,
add=TRUE, type="l")
idx <- sort(broad$d18OresidualMean.cent, index.return=TRUE)$ix
polygon(c(broad$d18OresidualMean.cent[idx],
rev(broad$d18OresidualMean.cent[idx])), c(pred$lwr[idx],
rev(pred$upr[idx])), col = "#00000020", border = NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.