search for: addinteriorlabel

Displaying 1 result from an estimated 1 matches for "addinteriorlabel".

2010 Jul 06
1
plotmath vector problem; full program enclosed
...rm(x[i],m=m,sd=sd)), lty= 14, lwd=.2) } } dividers <- c(qnorm(0.025), -1, 0, 1, qnorm(0.975)) addInteriorLine(mu+sigma*dividers, mu,sigma) # bquote creates an expression that text plotters can use t1 <- bquote( mu== .(mu)) mtext(bquote( mu == .(mu)), 1, at=mu, line=-1) addInteriorLabel <- function(pos1, pos2, m, s){ area <- abs(100*( pnorm(m+pos1*s,m,s)-pnorm(m+pos2*s, m,s))) mid <- m+0.5*(pos1+pos2)*s text(mid, 0.5*dnorm(mid,m,s),label=paste(round(area,2),"%")) } addInteriorLabel(dividers[1],dividers[2], mu, sigma) addInteriorLabel(divider...