Description Usage Arguments Examples
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.
1 2 | scaff_comparison(x, y, weight = NULL, matrix, padj = "holm",
conf.level = 0.95)
|
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.