calcBRAIDconfint: Calculate General BRAID Confidence Intervals

Description Usage Arguments Value Author(s) See Also Examples

View source: R/braidrm.R

Description

Produces confidence intervals for any general calculable property of a BRAID surface, based on a given BRAID surface fit (with bootstrapped coefficients).

Usage

1
calcBRAIDconfint(bfit, parfunc, civals = NULL)

Arguments

bfit

A BRAID surface fit of class braidrm, with bootstrapped coefficients

parfunc

A function to calculate a property of a response surface. parfunc must take a ten-element BRAID parameter vector as input, and return a single numeric value or a numeric vector of a fixed length as output.

civals

Values specifying the lower and upper bound of the confidence interval(s) to be calculated. If NULL (the default), the values of the ciLevs property of bfit will be used. NOTE: using a wider percentile here than was used to estimate the bootstrapped coefficients can lead to an unstable confidence interval.

Value

If parfunc produces a single value as output, a vector of three values: the second value is the estimate of the best BRAID surface fit, while the first and third values represent the lower and upper bounds of the calculated confidence interval. If parfunc produces a vector as output, an array of width three: the second column is the estimate of the best BRAID surface fit, while the first and third columns represent the lower and upper bounds of the calculated confidence intervals.

Author(s)

Nathaniel R. Twarog

See Also

braidrm,getBRAIDbootstrap

Examples

1
2
3
4
5
6
7
8
9
data(es8olatmz)

brd <- braidrm(act~conc1+conc2,es8olatmz,fixed=c(NA,NA,NA,NA,1,NA,NA,-4,-4,-4))
potci <- calcBRAIDconfint(brd,function(parv) invertBRAIDrsm(-1,DA=10^-7,parv=parv))
## Not run: 
pconc <- exp(seq(log(10^-6),log(10^-3),length=100))
effci <- calcBRAIDconfint(brd,function(parv) evalBRAIDrsm(10^-7,pconc,parv))

## End(Not run)

braidrm documentation built on May 19, 2017, 11:05 a.m.

Search within the braidrm package
Search all R packages, documentation and source code