[R] confusion with boot

From: John Sorkin <jsorkin_at_grecc.umaryland.edu>
Date: Thu 02 Jun 2005 - 12:13:10 EST


I think I am doing something wrong when I try to bootstrap R square obtained from lm. My code is included below. No matter how many times I run the simulation, I always get exactly the same result, the bias and std.error are always zero. I would think that these values should be non-zero. I would appreciate any suggestions as to what I am doing wrong, or perhaps what I fail to understand. R 2.1.0 Patched Win 2k.
Thanks,
John    

>detefun3<-function (d,w)
summary(lm(d$sg120~d$fg120adj,data=d))$r.square
> boot(delete,deletefun3,R=200)
 

ORDINARY NONPARAMETRIC BOOTSTRAP Call:
boot(data = delete, statistic = deletefun3, R = 200)

Bootstrap Statistics :

     original  bias    std. error
t1* 0.3028048       0           0

>
 

John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC and
University of Maryland School of Medicine Claude Pepper OAIC  

University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524  

410-605-7119
- NOTE NEW EMAIL ADDRESS:
jsorkin@grecc.umaryland.edu

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 02 12:19:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:21 EST