cMackSkil: Computes a critical value for the Mack-Skillings MS...

Description Usage Arguments Value Author(s) Examples

View source: R/cMackSkil.R

Description

This function computes the critical value for the Mack-Skillings MS distribution at (or typically in the "Exact" and "Monte Carlo" cases, close to) the given alpha level.

Usage

1
cMackSkil(alpha,k,n,c, method=NA, n.mc=10000)

Arguments

alpha

A numeric value between 0 and 1.

k

A numeric value indicating the number of treatments.

n

A numeric value indicating the number of blocks.

c

A numeric value indicating the number of replications for each treatment-block combination.

method

Either "Exact", "Monte Carlo" or "Asymptotic", indicating the desired distribution. When method=NA, "Exact" will be used if the number of permutations is 10,000 or less. Otherwise, "Monte Carlo" will be used.

n.mc

If method="Monte Carlo", the number of Monte Carlo samples used to estimate the distribution. Otherwise, not used.

Value

Returns a list with "NSM3Ch7c" class containing the following components:

k

number of treatments

n

number of blocks

c

number of replications

cutoff.U

upper tail cutoff at or below user-specified alpha

true.alpha.U

true alpha level corresponding to cutoff.U (if method="Exact")

Author(s)

Grant Schneider

Examples

1
2
3
4
##Hollander-Wolfe-Chicken Example 7.9 Determination of Niacin in Bran Flakes
cMackSkil(.0501,4,3,3)
##Hollander-Wolfe-Chicken Chapter 7 Comment 72
cMackSkil(.0502,4,4,3)

Example output

Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: MASS
Loading required package: partitions
Loading required package: survival
fANCOVA 0.5-1 loaded

Monte Carlo Approximation (with 10000 Iterations) used: 
 
Number of blocks: n=3
Number of treatments: k=4
For the given alpha=0.0501, the upper cutoff value is Mack-Skillings MS=7.66667, with true alpha level=0.05

Monte Carlo Approximation (with 10000 Iterations) used: 
 
Number of blocks: n=4
Number of treatments: k=4
For the given alpha=0.0502, the upper cutoff value is Mack-Skillings MS=7.65385, with true alpha level=0.0501

NSM3 documentation built on April 6, 2021, 5:05 p.m.

Related to cMackSkil in NSM3...