Skip to content

ZacWarham/Skillings.Mack

 
 

Repository files navigation

Skillings.Mack.Suppress

“A generalization of the statistic used in Friedman’s ANOVA method and in Durbin’s rank test. This nonparametric statistical test is useful for the data obtained from block designs with missing observations occurring randomly. A resulting p-value is based on the chi-squared distribution and Monte Carlo method.” - Patchanok Srisuradetchai

Changes

This repository is a small update to the Skillings.Mack package with the purpose of providing more options for outputting the results. The original options would print the following;

Ski.Mack(some_matrix, simulate.p.value = TRUE, B = 1000)

Original

Whilst useful, if you were to assign the result to a variable you would still have the same output in your console or markdown. By adding a new parameter, suppress = TRUE, this reduces the output to just the test statistics results like this;

Surpressed

This is particularly useful when trying to knit a document with a very large matrix or if you have to run similar tests multiple times. Instead of hiding the entire output, you just see the test statistics results. Please note, this only reduces the output when you assign the result to a variable.

A further addition was to include the p-value and Simulated p-value in the output list so they can be accessed when stored in a variable.

some_result <- Ski.Mack(some_matrix, simulate.p.value = TRUE, B = 1000, suppress = TRUE)
#> 
#> Skillings-Mack Statistic =  15.493049 , p-value =  0.001440 
#> Note: the p-value is based on the chi-squared distribution with d.f. =  3 
#> Based on B =  1000 , Simulated p-value =  0.001000

some_result$pValue
#>                [,1]
#> [1,] 0.001440296302
some_result$pValueSim
#> [1] 0.001

Complete

Installation

This package can be installed from GitHub with:

install.packages("devtools")
devtools::install_github("ZacWarham/Skillings.Mack")

library(Skillings.Mack.Suppress)

Once installed this release should be fully compatible with all working code from the original release. To reduce the output you just need to add the suppress = FALSE parameter. Both additional values should automatically be included in any assigned variables. Make sure to detach the library and load Skillings.Mack.Suppress first. If there are any problems please create an issue in this repository.

About

Fork of Skillings.Mack to add more output options

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%