tpvalavg: Average of The Student t Distribution

Description Usage Arguments Examples

View source: R/tpvalavg.R

Description

Average of The Student t Distribution

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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))

Example output

[1] 0.4603989
[1] 0.4603989

brt documentation built on May 2, 2019, 10:22 a.m.

Related to tpvalavg in brt...