showStat: Draw distribution of statistics

Description Usage Arguments Examples

View source: R/showStat.R

Description

Draw distribution of statistics

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
showStat(
  fun = NULL,
  df1 = NULL,
  df2 = NULL,
  stat = NULL,
  alternative = c("two.sided", "less", "greater"),
  alpha = 0.05,
  show.area = TRUE,
  show.critical = TRUE,
  show.point = TRUE,
  color = "black",
  fill = "red",
  digits = 3
)

Arguments

fun

distrubution function

df1, df2

degrees of freedom

stat

numeric The value of statistics

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

alpha

numeric confidence level of the interval

show.area, show.critical, show.point

logical

color

character Name of line color

fill

character Name of fill color

digits

integer indicating the number of decimal places

Examples

1
2
3
4
chisq.test(table(mtcars$am,mtcars$vs))
showStat(fun=dchisq,df1=1,stat=0.34754)
t.test(mpg~am,data=mtcars)
showStat(dt,df1=18.332,stat=-3.7671)

cardiomoon/webr2 documentation built on April 24, 2020, 9:44 p.m.