ccFn=function(freq,age){ freq=freq/sum(freq) lm =lm(log(freq)~age) hat =exp(predict(lm)) sel =(freq/hat)/max(freq/hat) data.frame(age=age,obs=freq,hat=hat,sel=sel)}
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.