Learn R Programming

brt (version 1.3.0)

tpvalint: Hypothesis testing using the Student t Distribution with H0: lo <= mu <= hi

Description

Hypothesis testing using the Student t Distribution with H0: lo <= mu <= hi

Usage

tpvalint(coefficients, hi, lo = -hi, se, df, log = FALSE)

Arguments

coefficients

a vector

hi

upper bound

lo

lower bound

se

standard error

df

degrees of freedom

log

the probability is in log-scale

Examples

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

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

ggplot2::qplot(x, pval, data=data, color=as.factor(cutoff), linetype=as.factor(cutoff), geom='line')
# }

Run the code above in your browser using DataLab