[R] yuen function of the WRS2 package
jfhenson1 at gmail.com
Tue Aug 30 23:07:39 CEST 2016
Greetings R community,
Here is a small but perplexing problem with the ‘yuen’ function in the
I begin with the ‘eurosoccer’ data frame from the ‘WRS2’ package.
Then make a subset that contains only two Leagues Spain and Germany
(subset data frame is ‘SpainGer’). The ‘yuen’ function cannot read
the data in subset data frame ‘SpainGer’. My code is below.
Thanks you for your help.
James F. Henson
# Examples from 'Robust Statistical Methods on R Using the WRS2 Package’
# Robust t-test, and ANOVA (pages5-13)
# make a subset with only Spain and Germany
SpainGer <- subset (eurosoccer, subset = League =="Spain" | League == "Germany")
# The 'yuen' function can not read the data in the subset data.frame "SpainGer"
yuen(GoalsGame ~ League, tr=0.2, data = SpainGer)
# the 'yuen' function works on the orginioal data.frame
yuen(GoalsGame ~ League, tr=0.2, data = eurosoccer)
# the 'aov' function reads the data in the subset data.frame "SpainGer"
Goals.fit <- aov(GoalsGame ~ League, data = SpainGer)
More information about the R-help