plot( x=x, y=constant.post.9mo(x,lambda) )
x <- 0:24 ; lambda <- seq( 1.0, 0.1, -0.2 )
plot( type="n", x=x, xlab="age", ylab="constant.post.9mo(age,lambda)",
xlim=c(min(x),max(x)), ylim=c(0,1),
xaxp=c(min(x),max(x),(max(x)-min(x))/2) )
legend( "bottomright", "lambda", lambda, inset=0.1,
fill=c(1:length(lambda)) )
for ( i in 1:length(lambda) ) {
lines( x=x, y=constant.post.9mo(x,lambda[i]), col=i )
}Run the code above in your browser using DataLab