CAMEL
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Nonparametric Statistics in R

Go down

Nonparametric Statistics in R  Empty Nonparametric Statistics in R

Post by Brendentc 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
#########
avatar
Brendentc

Posts : 2
Reputation : 0

Back to top Go down

Back to top

- Similar topics

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