data(MktDATA, package = "UBStats")
# Using x,y: build vectors with data on the two groups
AOV_M <- MktDATA$AOV[MktDATA$Gender == "M"]
AOV_F <- MktDATA$AOV[MktDATA$Gender == "F"]
TEST.diffvar(x = AOV_M, y = AOV_F)
TEST.diffvar(x = AOV_F, y = AOV_M) # same
# Using x,by: groups identified by ordered levels of by
TEST.diffvar(x = AOV, by = Gender, data=MktDATA)
# Output results
out_test.diffV<-TEST.diffvar(x = AOV_M, y = AOV_F)
# Arguments force.digits and use.scientific
# An input variable taking very low values
SmallX<-MktDATA$AOV/50000
SmallX_M <- SmallX[MktDATA$Gender == "M"]
SmallX_F <- SmallX[MktDATA$Gender == "F"]
# - Default output
TEST.diffvar(x = SmallX_M, y = SmallX_F)
# - Request to use the exact number of digits (default, 2)
TEST.diffvar(x = SmallX_M, y = SmallX_F,
force.digits = TRUE)
# - Request to allow scientific notation
TEST.diffvar(x = SmallX_M, y = SmallX_F,
use.scientific = TRUE)
Run the code above in your browser using DataLab