Description Usage Arguments Value Examples
Diagram for graphically adjusting sample R$^2$ values
1 2 |
c |
Adjustment exponent |
R2c |
Vector of c-hypotheses |
col |
Line colour |
lwd |
Line width |
lty |
Line type |
NULL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | ##########################
#
# basic idea
#
##########################
graphical.AdjRsqr()
text(0.25, 0.75, expression(paste('positive adjusted ', R^2)), adj = 0.5)
text(0.75, 0.25, expression(paste('negative adjusted ', R^2)), adj = 0.5)
##########################
#
# illustrative example (positive case)
#
##########################
graphical.AdjRsqr()
R2 <- 0.8
R02 <- 0.4
d <- 0.03
segments(R02, 0, R02, R02, lty = 3, col = grey(0.7))
segments(0, R2, R02, R2, lty = 3, col = grey(0.7))
points(R02, R2, pch = 16, cex = 1.5)
segments(R02, R02, R02, 1, lwd = 3, lend = 1)
segments(R02-d, R02, R02-d, R2, col = grey(0.6), lwd = 3, lend = 1)
text(R02-d-d-d-d-0.5*d, (R2+R02)/2,
expression('R'^2 - 'R'[0]^2),
col = grey(0.6))
text(R02+d+d+d, (R2+1)/2,
expression(1 - 'R'[0]^2),
col = grey(0))
##########################
#
# illustrative example (negative case)
#
##########################
graphical.AdjRsqr()
R2 <- 0.3
R02 <- 0.4
d <- 0.03
points(R02, R2, pch = 16, cex = 1.5)
segments(R02, 0, R02, R2, lty = 2)
segments(0, R2, R02, R2, lty = 2)
segments(R02, R2, R02, 1, lwd = 3, lend = 1)
segments(R02-d, R02, R02-d, 1, col = grey(0.6))
segments(R02-d-d-d, R02, R02-d-d-d, R2, col = grey(0.6))
text(R02-d-d-d-d-d-0.5*d, (R2+R02)/2,
expression('R'^2 - 'R'[0]^2),
col = grey(0.6))
text(R02-d-d-d, (R02+1)/2,
expression(1 - 'R'[0]^2),
col = grey(0.6))
##########################
#
# predictive adjustments
#
##########################
cexs <- 0.8
ydisp <- 0.06
graphical.AdjRsqr(c = c(1, 2))
ypos <- 0.3
text(0.7, ypos, expression('R'['adj']^2 < 0), cex = cexs)
text(0.7, ypos - ydisp, expression('R'['pred']^2 < 0), cex = cexs)
ypos <- 0.65
text(0.5, ypos, expression('R'['adj']^2 > 0), cex = cexs)
text(0.5, ypos - ydisp, expression('R'['pred']^2 < 0), cex = cexs)
ypos <- 0.8
text(0.2, ypos, expression('R'['adj']^2 > 0), cex = cexs)
text(0.2, ypos - ydisp, expression('R'['pred']^2 > 0), cex = cexs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.