compareGroups(X, ...)
## S3 method for class 'default':
compareGroups(X, y, selec = NA, method = 1, alpha = 0.05, min.dis =
5, max.ylev = 5, max.xlev=10, include.label=TRUE, ...)
## S3 method for class 'formula':
compareGroups(X, data, subset, na.action= NULL, include.label=TRUE, ...)
## S3 method for class 'compareGroups':
plot(x, z=1.5 ,n.breaks="Sturges", ...)
shapiro.test
normality test for continuous row-variables. Default value is 0.05.na.pass
, which means no action. Value
hist
'print' returns a table sample size, overall p-values, type of variable ('categorical', 'normal' or 'non-normal') and the subset of individuals selected.
'summary' returns a much more detailed list. Every component of the list is the result for each row-variable, showing frequencies, mean, standard deviations or quartiles as appropriate. Also, it shows overall p-values as well as p-trends and pairwise p-values among the groups. 'plot' displays multiple devices with normality plots and Shapiro-Wilks test, for each of the continuous row-variables. If row-variable has less than 5 different values, it plots nothing. An update method for 'compareGroups' objects has been implemented and works as usual to change all the arguments of previous analysis.
See examples for further illustration about all previous issues.
1-pchisq(cor(as.integer(x),as.integer(y))^2*(length(x)-1),1)
, where 'x' is the row-variable and 'y' is the grouping variable.See the vignette to see more detailed examples illustrating the use of this function and their methods.
createTable
, cGroupsGUI
data(myData)
# by formula
ans<-compareGroups(y~.,data=myData)
ans
summary(ans)
update(ans,y~.-a)
# by data.frame
X<-myData[,c("a","b","c")]
y<-myData[,"y"]
ans<-compareGroups(X,y)
ans
summary(ans)
Run the code above in your browser using DataLab