Two functions to find tsalpha and alternative.
getTSalpha(tsalpha = NULL, alternative = NULL, conf.level = NULL)
getAlternative(tsalpha)getTSalpha returns a tsalpha vector (see details), and getAlternative gives the character vector for the appropriate alternative.
vector of length 2 with nominal significance levels for each side, if not NULL overrides conf.level and alternative (see details)
confidence level, ignored if tsalpha is not NULL
character, alternative hypothesis, either 'less', 'greater' or 'two.sided'
The tsalpha is a vector of length 2 giving the nominal error for each side
of confidence intervals. The function getTSalpha creates a tsalpha vector, allowing its creation either directly (non-null input for the argument tsalpha
simply outputs that same argument), or through the alternative and conf.level arguments.
The element tsalpha[1] is the nominal error on the lower side, so for example if tsalpha=NULL, alternative='greater', andconf.level=.95,
then getTSalpha outputs the vector c(0.05,0). In other words, if on rejection you want to conclude that \(\theta>\theta_0\), then you want all the nominal
error to be on the lower side. Similarly tsalpha[2] is the nominal error on the upper side, and tsalpha=NULL, alternative='less', andconf.level=.95,
gives c(0,0.05). If tsalpha=NULL, alternative='greater', and conf.level=.95, then outputs the vector c(0.025,0.025).
You must supply either tsalpha or both alternative and conf.level.
getTSalpha(conf.level=.95,alternative="two.sided")
getAlternative(c(0,.025))
Run the code above in your browser using DataLab