Learn R Programming

brt (version 1.3.0)

tpvalavg: Average of The Student t Distribution

Description

Average of The Student t Distribution

Usage

tpvalavg(coefficients, hi, lo = -hi, se, df, n = as.integer(ceiling(abs(hi -
  lo) * 10)), log = FALSE)

Arguments

coefficients

a vector

hi

upper bound of the shift range

lo

lower bound of the shift range

se

standard error

df

degrees of freedom

n

the number of bins for interpolation

log

the probability is in log-scale

Examples

Run this code
# NOT RUN {
x=seq(from=0, to=30, length.out=100)

data=do.call(
  rbind
  , lapply(
    seq_len(10)
    , function(cutoff)
      rbind(
        data.frame(x, pval=tpvalavg(x, hi=1, se=1, df=3), cutoff=cutoff)
        )
    )
  )

ggplot2::qplot(x, log(pval), data=data, color=as.factor(cutoff), 
	linetype=as.factor(cutoff), geom='line')
tpvalavg(1, hi=1, se=1, df=3)
exp(tpvalavg(1, hi=1, se=1, df=3, log=TRUE))
# }

Run the code above in your browser using DataLab