prelimstats: Preliminary Statistics

Description Usage Arguments Details Value Examples

Description

This function calculates and displays the p values for the requested distribution tests.

Usage

1
2
3
prelimstats(dosecolumn="",
            tests=c("outlier", "bartlett", "shapiro", "chisquare", "jonckheere"),
            data=NA)

Arguments

dosecolumn

Name of column containing dose in input data frame, e.g. "dose"

tests

List of tests to run. May specify a subset by omitting any of the default tests = c("outlier", "bartlett", "shapiro", "chisquare", "jonckheere").

data

Input dataframe.

Details

Outlier (Bonferroni Outlier Test), homogeneity (Bartlett's), normality (Shapiro-Wilk), composite homogeneity/normality (Fisher chi-square combining Bartlett's and Shapiro-Wilk), and Jonckeere's (monotone trend) tests are available. All tests are executed unless a smaller set is specified using the 'tests' parameter.

Outlier test. Calls car::outlierTest – there is at least one Bonferroni-adjusted outlier if the p value is less than the targeted alpha level.

Bartletts. Variances are non-homogeneous if the p value is less than the targeted alpha level.

Shapiro-Wilk. The variable is non-normally distributed if the p-value is less than the targeted alpha level.

Chisquare. Fisher's combined p value for Bartlett's and Shapiro-Wilk tests. This indexes the conformance of the outcome and its transformations to both normality and variance homogeneity. Generally, the response transformation associated with the least-significant (highest p-value) is the most desirable transformation.

Jonckheere. There is evidence of a monotonic trend if the p-value is lower than the targeted alpha.

All columns other than the one identified as the dosecolumn are subjected to these tests; therefore the input data frame should only contain the dosecolumn and response column(s). This function is currently only intended for use on continuous outcome data.

Value

Shown are p values for the homogeneity, normality, and trend tests, and the Bonferroni-adjusted p value for the most outlierly case.

Examples

1
2
3
4
5
6
7
8
# Prints all available preliminary tests:
prelimstats("dose", data=DRdata)

# Prints only the outlier test:
prelimstats("dose", tests="outlier", data=DRdata)

# Prints only the homogeneity and normality tests:
prelimstats("dose", tests=c("bartlett", "shapiro"), data=DRdata)

drsmooth documentation built on May 1, 2019, 10:28 p.m.