cSkilMack | R Documentation |
This function computes the critical value for the Skillings-Mack SM distribution at (or typically in the "Exact" and "Monte Carlo" cases, close to) the given alpha level.
cSkilMack(alpha, obs.mat, method = NA, n.mc = 10000)
alpha |
A numeric value between 0 and 1. |
obs.mat |
The incidence matrix, explained below. |
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. |
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.
Returns a list with "NSM3Ch7c" class containing the following components:
k |
number of treatments |
n |
number of blocks |
ss |
number of treatments per block |
cutoff.U |
upper tail cutoff at or below user-specified alpha |
true.alpha.U |
true alpha level corresponding to cutoff.U (if method="Exact" or "Monte Carlo") |
The syntax of this procedure differs from the others in the NSM3 package due to the fact that the distribution is calculated conditionally on the pattern of missingness. We therefore require obs.mat, the incidence matrix.
Grant Schneider
##Hollander, Wolfe, Chicken Example 7.8 Effect of Rhythmicity of a Metronome on Speech Fluency
obs.mat<-matrix(c(rep(1,10),0,rep(1,13)),ncol=3,byrow=TRUE)
#cSkilMack(.01,obs.mat)
cSkilMack(.01,obs.mat,n.mc=5000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.