sm.density.compare(x, group, h, model = "none", ...)
"none"which restricts comparison to plotting only. The alternative value
"equal"can produce a bootstrap hypothesis test of equality and the display of an appropriate reference band.
sm.optionsfunction, through a mechanism which limits their effect only to this call of the function. Those specifically relevant for this function are the following:
nboot, plus those controlling graphical display (unless
display="none"is set); see the documentation of
sm.optionsfor their description. The parameter
nbootcontrols teh number of permutations used in the permutation test.
modelis set to
"none", nothing is returned. When
"model"is set to
"equal", a list containing the smoothing parameter and the p-value of the test is returned. When
bandtakes the value
TRUE, and there are only two groups to compare, the list contains in addition the upper and lower end-points of the reference band for equality.
y <- rnorm(100) g <- rep(1:2, rep(50,2)) sm.density.compare(y, g, model="equal")
Run the code above in your browser using DataCamp Workspace