[R] lm.boot function gives error

Randa booboo at gforcecable.com
Mon Oct 29 21:27:10 CET 2007


Indeed it does. The thing that confused me was that lm worked with the odd
data names but lm.boot did not. Thanks.

Tom

-----Original Message-----
From: Peter Dalgaard [mailto:p.dalgaard at biostat.ku.dk] 
Sent: Monday, October 29, 2007 4:15 PM
To: Tom La Bone
Cc: r-help at r-project.org
Subject: Re: [R] lm.boot function gives error

Tom La Bone wrote:
> When I run this calculation
>
>   library(ISwR)
>   library(simple.boot)
>   data(thuesen)
>   fit <- lm(thuesen$short.velocity~thuesen$blood.glucose)
>   summary(fit)
>   fit.sb <- lm.boot(fit,R=1000,rows=F)
>   summary(fit.sb)
>
> I get the following error from the lm.boot routine:
>
>   newdata' had 100 rows but variable(s) found have 24 rows
>
> I don't know what this error means. Also, this example is not vastly
> different than the one given in the simple.boot documentation and yet I
> can't get it to run. Any suggestions? Thanks.
>
> Tom
>   
I'm too lazy to install the package, but does it not help if you write 
the model call as

lm(short.velocity~blood.glucose, data=thuesen)

?


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list