scaff_comparisons: Creating Table of Multiple Comparisons for General Linear...

Description Usage Arguments Examples

Description

This function allows you to create a dataframe with computation of multiple comparisons for general linear regression, which can then be output to a table using different styles for publication or scientific reports. The function conducts multiple comparison of a factor variable to a continious variable using general linear regression. It will generate a table with the estimates for the multiple comparison between factor groups, the confidence intervals, and the p-value of that parameter, with the possibility of using adjusting p-value methods.

Usage

1
2
scaff_comparison(x, y, weight = NULL, matrix, padj = "holm",
  conf.level = 0.95)

Arguments

x

Categorical Predictor

y

Outcome of Interest

matrix

the matrix required for the multiple comparison

padj

type of p-value adjustment method; example: "holm", "bonferroni", "Westfall", "Shaffer", etc. Default = "holm"

conf.level

level of confidence requiered to calculate; default = 0.95.

weights

an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector. If non-NULL, weighted least squares is used with weights weights; otherwise ordinary least squares is used. Default = NULL.

Examples

1
2
3
4
5
Creating two different matrices for the function
tukey <- contrMat(table(iris$Species),"Tukey")
i <- rbind("Setosa-Versicolor" = c(1,-1,0),"Setosa-Virginica" = c(1,0,-1),"Versicolor-Virginica" = c(0,1,-1))
scaff_comparison(iris$Species, iris$Sepal.Width, matrix = tukey, padj = "holm", conf.level = 0.95)
scaff_comparison(iris$Species, iris$Sepal.Width, matrix = i, padj = "bonferroni", conf.level = 0.90)

mon4004/datascaffold documentation built on July 23, 2019, 8:23 p.m.