| hypothesis_latex {exams.forge} | R Documentation |
Latex Hypothesis
Description
Creates a data frame for a test hypothesis with various columns:
-
h0.leftleft value of the null hypothesis, usually\muor\pi -
h0.operatoroperator of the null hypothesis, one of the following:eq,ne,lt,le,gt, orge -
h0.rightright value of the null hypothesis, usually\mu_0,\pi_0, or a hypothetical value -
h1.leftleft value of the alternative hypothesis, usually\muor\pi -
h1.operatoroperator of the alternative hypothesis, one of the following:eq,ne,lt,le,gt, orge -
h1.rightright value of the alternative hypothesis, usually\mu_0,\pi_0, or a hypothetical value -
H0latex representation of the null hypothesis -
H1latex representation of the alternative hypothesis -
match.leftdo the left value in the null and the alternative hypothesis match? -
match.rightdo the right value in the null and the alternative hypothesis match? -
match.operatordo the operators in the null and the alternative hypothesis cover all real numbers? -
match.rightdo the right value in the null and alternative hypothesis match? -
match.typeeitherwrong,left.sided,right.sided,two.sided,greater, orless.
If null is not given then it is determined from alternative. Otherwise hypotheses pairs are generated by
all combinations from alternative and null.
Valid values for alternativeand null are two.sided, greater, less, eq, ne, lt, le, gt, or ge.
Usage
hypothesis_latex(
left,
alternative = NULL,
null = NULL,
right = paste0(left, "_0")
)
lhypo(left, alternative = NULL, null = NULL, right = paste0(left, "_0"))
Arguments
left |
character: symbol, for example |
alternative |
character: alternative hypotheses |
null |
character: null hypotheses (default: |
right |
character: a symbol (default: |
Value
A data frame with hypothesis pairs.
Examples
# Create one hypotheses pair
hypothesis_latex("\\mu")
hypothesis_latex("\\pi")
hypothesis_latex("\\mu", alternative="two.sided")
hypothesis_latex("\\mu", alternative="two.sided", null="lt")
hypothesis_latex("\\mu", alternative="ne", null="eq")
hypothesis_latex("\\mu", right=c(0,1))
hypothesis_latex("\\mu", alternative=c("eq", "ne", "lt", "le", "gt", "ge"))
hypothesis_latex("\\mu", alternative=c("eq", "ne", "lt", "le", "gt", "ge"),
null=c("eq", "ne", "lt", "le", "gt", "ge"))