Skip to content

Instantly share code, notes, and snippets.

@cboettig
Created October 5, 2010 23:57
Show Gist options
  • Save cboettig/612570 to your computer and use it in GitHub Desktop.
Save cboettig/612570 to your computer and use it in GitHub Desktop.
pow <- power_between_models(ou2,ouLP, nboot=1000)
png("OU2vOULP.png")
plot(density(pow$null_dist), xlim=c(-40,40), lwd=3, main="OU.2 v OU.LP")
lines(density(pow$test_dist), xlim=c(-40,40), lwd=3, lty=2)
abline(v=-2*(ouLP@loglik-ou2@loglik), lwd=3, col="darkred" )
legend("topleft", c("sim under OU.2", "sim under OU.LP"), lty=c(1,2))
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment