Description Usage Author(s) Examples
This function compares two bagplots.
1 2 3 | weighted.bagplot(x, y, weights, resolution = 10)
compareBagPlots(bp.selected, bp.reference, col.selected="#55555555", col.reference="#ffffff", ...)
|
Przemyslaw Biecek
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(PISA2009lite)
sel <- student2009[student2009$OECD == "OECD",]
rPV <- removeGroupMeans(sel$PV1MATH, factor(paste(sel$CNT, sel$SCHOOLID)), sel$W_FSTUWT)
rES <- removeGroupMeans(sel$ESCS, factor(paste(sel$CNT, sel$SCHOOLID)), sel$W_FSTUWT)
rBagPlot <- weighted.bagplot(rPV, rES, sel$W_FSTUWT)
sel <- student2009[student2009$CNT == "Poland",]
pPV <- removeGroupMeans(sel$PV1MATH, factor(paste(sel$CNT, sel$SCHOOLID)), sel$W_FSTUWT)
pES <- removeGroupMeans(sel$ESCS, factor(paste(sel$CNT, sel$SCHOOLID)), sel$W_FSTUWT)
pBagPlot <- weighted.bagplot(pPV, pES, sel$W_FSTUWT)
compareBagPlots(rBagPlot, pBagPlot,
xlim=c(-100,100), ylim=c(-1,1), xlab="PV1MATH diff", ylab="ESCS diff")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.