Learn R Programming

ipdmeta (version 1.1)

ci: Confidence Interval for linear combination of parameter estimates.

Description

Returns point-estimate for transformation of linear combination of parameter estimates.

Usage

ci(C,estimates,variance,alpha=.05,f=function(x){exp(x)})

Arguments

C
Vector or matrix of linear combinations, if matrix linear combinations are by row.
estimates
Vector of parameter estimates
variance
Matrix of variances for estimates
alpha
Significance level for normal-based CI
f
Function for the parameter transformation at CI endpoints

Value

  • List of transformed point-estimate and CI.

Details

If x is a matrix, then the ci function is applied by row.

Examples

Run this code
data(cars)
fit <- lm(dist~speed,cars)

#AVERAGE DISTANCE GIVEN SPEED OF 10

ci(matrix(c(1,10),1),coef(fit),vcov(fit),f=function(x){x})

Run the code above in your browser using DataLab