Nonparametric Statistics in R

View previous topic View next topic Go down

Nonparametric Statistics in R

Post by Brendentc on Tue Oct 31, 2017 12:52 pm

Code:
#####CAMeL Nonparametric Presentation Code#########
####Non parametric stats######################################

###Wilcoxon rank sum test##
wilcox.test(alc_inutero_total_f~userf,accuracymeanswithdemo)
######Spearman/Kendall Correlation#####
cor.test(dfdf2$cig_inutero_total,dfdf2$cig28,method="spearman")
cor.test(dfdf2$cig_inutero_total,dfdf2$cig28,method="kendall")


####Other Statistics Used in Presentation######################################
chisq.test(table(accuracymeanswithdemo$alc_inutero_total_f,accuracymeanswithdemo$userf))###chisquare with yates
fisher.test(table(accuracymeanswithdemo$alc_inutero_total_f,accuracymeanswithdemo$userf))###fisher's exact test
############
leveneTest(alc_inutero_total_f~userf,accuracymeanswithdemo)
t.test(alc_inutero_total_f~userf,data=accuracymeanswithdemo,var.equal=TRUE)###t-test equivalent variance
t.test(alc_inutero_total_f~userf,data=accuracymeanswithdemo,var.equal=FALSE)###t-test unequal variance
#########

Brendentc

Posts : 2
Reputation : 0

View user profile

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum