View source: R/nortestTwoWay.R

nortestTwoWay | R Documentation |

`nortestTwoWay`

performs normality tests including Shapiro-Wilk, Shapiro-Francia, Kolmogorov-Smirnov, Anderson-Darling, Cramer-von Mises, Pearson Chi-square tests, and also assess the normality of each group through plots for two-way layout.

```
nortestTwoWay(formula, data, method = c("SW", "SF", "LT", "AD", "CVM", "PT"),
alpha = 0.05, plot = c("qqplot", "histogram"), na.rm = TRUE, verbose = TRUE)
```

`formula` |
a formula of the form |

`data` |
a data frame containing the variables in |

`method` |
a character string to select one of the normality tests. "SW": Shapiro-Wilk test, "SF": Shapiro-Francia test, "LT": Lilliefors (Kolmogorov-Smirnov) test, "AD": Anderson-Darling test, "CVM": Cramer-von Mises test, "PT": Pearson Chi-square test. |

`alpha` |
the level of significance to assess normality. Default is set to alpha = 0.05. |

`plot` |
a character string to select one of the plots including qqplot and histogram. The red line is the density line of normal distribution. If plot is set to NULL, the plot is not returned. |

`na.rm` |
a logical value indicating whether NA values should be stripped before the computation proceeds. |

`verbose` |
a logical for printing output to R console. |

A data frame gives the test results for the normality of each subset via corresponding normality.

Osman Dag, Sam Weerahandi, Malwane Ananda

`gplotTwoWay`

`shapiro.test`

```
library(twowaytests)
data(alveolar)
nortestTwoWay(cell ~ ovalbumin*treatment, data = alveolar)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.