A function to request T-test plots on a call to proc_ttest. The function allows you to specify the type of regression plots to produce. It produces a combined diagnostics panel by default. You may also specify individual plots to create by setting the "panel" parameter to FALSE, and passing a vector of plot names on the "type" parameter.

ttestplot(type = "default", panel = TRUE, showh0 = FALSE)

Arguments

type

The type(s) of plot to create. Multiple types should be passed as a vector of strings. Valid values are "agreement", "boxplot", "histogram", "interval", "profiles", "qqplot", "summary". The default value is a vector with "summary" and "qqplot".

panel

Whether or not to display the summary plot combined into in a single panel. Default is TRUE. A value of FALSE will create individual plots instead. This parameter is equivalent to the "unpack" keyword in SAS.

showh0

Whether or not to show the h0 line on a single-variable T-test. Default is FALSE.

Details

Any requested plots will be displayed on interactive reports only. Plots are created as jpeg files, and stored in a temp directory. Those temporary files are then referenced by the interactive report to display the graphic.

If desired, you may output the report objects and pass to proc_print. To do this, set output = report on the call to proc_freq, and pass the entire list to proc_print.

Plots

The plots parameter allows you to request several types of T-Test plots. Below are the types of plots that are supported. The list shows the plot type keyword needed to request the plot, and a brief description:

  • agreement: An agreement plot for the input data. Only available for paired comparisons.

  • boxplot: Displays a box and whisker plot for group comparisons, including confidence intervals (if appropriate).

  • histogram: A histogram with normal curve and kernel density overlays.

  • interval: Visualizes the confidence intervals for means.

  • profiles: A line plot mapping responses between analysis variables. Available only for paired analysis.

  • qqplot: A quantile-quantile plot used to assess the assumption of normality.

  • summary: Combines the histogram and boxplot charts onto the same panel.

The above plots may be requested as a vector of keywords to the plots parameter on proc_ttest, or as vector of values to the type parameter on ttestplots.

Note that, when passed as a vector of keywords, only the requested plots will be produced. That is to say, the "only" keyword in SAS is implied at all times for proc_ttest.

Examples