Learn R Programming

NSM3 (version 1.1)

cDurSkiMa: Computes a critical value for the Durbin, Skillings-Mack D distribution.

Description

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

Usage

cDurSkiMa(alpha,obs.mat, method=NA, n.mc=10000)

Arguments

Value

Returns a list with "NSM3Ch7c" class containing the following components:knumber of treatmentsnnumber of blocksssnumber of treatments per blockppnumber of observations per treatmentlambdanumber of times each pair of treatments occurs together within a blockcutoff.Uupper tail cutoff at or below user-specified alphatrue.alpha.Utrue alpha level corresponding to cutoff.U (if method="Exact" or "Monte Carlo")

Details

The incidence matrix, obs.mat, will be an n x k matrix of ones and zeroes, which indicate where the data are observed and unobserved, respectively. Methods for finding the incidence matrix for various BIBD designs are given in the literature. While the incidence matrix will not be unique for a given (k, n, s, lambda, p) combination, the distribution of D under H0 will be the same.

Examples

Run this code
##Hollander, Wolfe, Chicken Chapter 7, comment 49 
obs.mat<-matrix(c(1,1,0,1,0,1,0,1,1),ncol=3,byrow=TRUE)
cDurSkiMa(.75,obs.mat)

Run the code above in your browser using DataLab