Two functions to find `tsalpha`

and `alternative`

.

1 2 | ```
getTSalpha(tsalpha = NULL, alternative = NULL, conf.level = NULL)
getAlternative(tsalpha)
``` |

`tsalpha` |
vector of length 2 with nominal significance levels for each side, if not NULL overrides |

`conf.level` |
confidence level, ignored if tsalpha is not NULL |

`alternative` |
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'`

, and`conf.level=.95`

,
then `getTSalpha`

outputs the vector `c(0.05,0)`

. In other words, if on rejection you want to conclude that *θ>θ_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'`

, and`conf.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`

returns a tsalpha vector (see details), and `getAlternative`

gives the character vector for the appropriate alternative.

1 2 | ```
getTSalpha(conf.level=.95,alternative="two.sided")
getAlternative(c(0,.025))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.