## show plot code

```
library (bmmb)
data (height_data)
data (lee_etal_data)
par (mfrow = c(1,3), mar = c(4.1,4.1,1,1))
plot (height_data$age[height_data$gender=="f"]-.1,
$height[height_data$gender=="f"],
height_datapch=16,col=2,lwd=2,cex=1.5, ylim = c(70,205),type='b',
xlab="Age (years)", ylab = "Height (cm)",xlim=c(2,21),
cex.axis=1.3,cex.lab=1.3)
lines (height_data$age[height_data$gender=="m"]+.1,
$height[height_data$gender=="m"],
height_datapch=16,col=4,lwd=2,cex=1.5,type='b')
grid()
legend (13,110,legend = c("Female","Male"), col = c(2,4),
pch=16,cex=1.2, pt.cex=1.5, bty='n')
::errorbars(
phonTools$age[height_data$gender=="f"]-.1,
height_data$height[height_data$gender=="f"],
height_data$sd[height_data$gender=="f"]*2,col=2,
height_datalwd=1,length=0.051)
::errorbars(
phonTools$age[height_data$gender=="m"]+.1,
height_data$height[height_data$gender=="m"],
height_data$sd[height_data$gender=="m"]*2,col=4,
height_datalwd=1,length=0.051)
rect (9.5,120,12.5,177,lwd=2,border="forestgreen",lty=1)
rect (17.5,143,20.5,205,lwd=2,border="forestgreen",lty=1)
$f0_original=lee_etal_data$f0
lee_etal_data
$f0 = log(lee_etal_data$f0_original)
lee_etal_data= aggregate (f0 ~ age+gender, FUN = mean,
aggdmu data = lee_etal_data)
3] = exp(aggdmu[,3])
aggdmu[,
$f0 =
lee_etal_datalog(lee_etal_data$f0sd/lee_etal_data$f0_original)
= aggregate (f0 ~ age+gender, FUN = sd,
aggdsd data = lee_etal_data)
3] = (exp(aggdsd[,3])-1)*aggdmu[,3]
aggdsd[,
= aggdmu
aggdmuf0 = aggdsd
aggdsdf0
plot (aggdmu$age[aggdmu$gender=="f"]-.1,
$f0[aggdmu$gender=="f"], pch=16,col=2,lwd=2,
aggdmucex=1.5, ylim = c(75,370),type='b', xlab="Age (years)",
ylab = "f0 (Hz)",xlim=c(2,21),cex.axis=1.3,cex.lab=1.3)
lines (aggdmu$age[aggdmu$gender=="m"]+.1,
$f0[aggdmu$gender=="m"],
aggdmupch=16,col=4,lwd=2,cex=1.5,type='b')
grid()
::errorbars(
phonTools$age[aggdmu$gender=="f"]-.1,aggdmu$f0[aggdmu$gender=="f"],
aggdmu$f0[aggdsd$gender=="f"]*2,col=2,lwd=1,length=0.051)
aggdsd::errorbars(
phonTools$age[aggdmu$gender=="m"]+.1,aggdmu$f0[aggdmu$gender=="m"],
aggdmu$f0[aggdsd$gender=="m"]*2,col=4,lwd=1,length=0.051)
aggdsd
= (log(lee_etal_data$f1)+log(lee_etal_data$f2)+
gbars log(lee_etal_data$f3))/3
= aggregate (gbars ~ age+gender, FUN = mean,
aggdmu data = lee_etal_data)
3] = (aggdmu[,3])
aggdmu[,
$vtl = exp(-((aggdmu$gbar)-min(aggdmu$gbars)))
aggdmu$vtl = 15 * aggdmu$vtl
aggdmu
= (log(lee_etal_data$f1sd/lee_etal_data$f1)+
vtl log(lee_etal_data$f2sd/lee_etal_data$f2)+
log(lee_etal_data$f3sd/lee_etal_data$f3))/3
= aggregate (vtl ~ age+gender, FUN = mean,
aggdsd data = lee_etal_data)
3] = exp(aggdsd[,3])*aggdmu$vtl
aggdsd[,
= aggdmu
aggdmuvtl = aggdsd
aggdsdvtl
plot (aggdmu$age[aggdmu$gender=="f"]-.1,
$vtl[aggdmu$gender=="f"], pch=16,col=2,lwd=2,
aggdmucex=1.5, ylim = c(8.5,17),type='b', xlab="Age (years)",
ylab = "VTL (cm)",xlim=c(2,21),cex.axis=1.3,cex.lab=1.3)
lines (aggdmu$age[aggdmu$gender=="m"]+.1,
$vtl[aggdmu$gender=="m"],
aggdmupch=16,col=4,lwd=2,cex=1.5,type='b')
grid()
::errorbars(aggdmu$age[aggdmu$gender=="f"]-.1,
phonTools$vtl[aggdmu$gender=="f"],
aggdmu$vtl[aggdsd$gender=="f"]*2,
aggdsdcol=2,lwd=1,length=0.051)
::errorbars(aggdmu$age[aggdmu$gender=="m"]+.1,
phonTools$vtl[aggdmu$gender=="m"],
aggdmu$vtl[aggdsd$gender=="m"]*2,
aggdsdcol=4,lwd=1,length=0.051)
```