[R] Trouble with parametric bootstrap

2009-05-12 Thread Anders Bjorn
Hi, I'm having trouble understanding how to construct a random number generator for a parametric bootstrap. My aim is to bootstrap a Likelihood Ratio statistic (under the null) for a linear model. The function at this point is given by boot.test.n01 - function(data, indeces, maxit=20) { y1 -

[R] How to create the null distribution

2009-04-17 Thread Anders Bjorn
Hi, I want to bootstrap the likelihood ratio test for testing linear restrictions on the parameters of a regression model. The aim is to perform a size and power analysis. My question is, as indicated by the subject, how do I approximate the null distribution? The code that I ran looks like

[R] Trouble extracting graphic results from a bootstrap

2009-04-03 Thread Anders Bjorn
Hi, I'm trying to extract a histogram over the results from a bootstrap. However I keep receiving the error message Error in hist.default(boot.lrtest$ll, breaks = scott) : 'x' must be numeric. The bootstrap I'm running looks like: boot.test - function(data, indeces, maxit=20) { + y1 -