[R] estimating p values bootstrap regression

From: Roberto Edmundo Munguia Steyer <munguiar_at_ecologia.edu.mx>
Date: Thu 26 May 2005 - 14:36:06 EST


Dear R-users:

I have a basic question.

I am trying to estimate the gradients of sexual selection on the males of a waterbug species.I performed a bootstrap analysis on a multiple regression using library boot and obtained the estimated coefficents and their respective standard errors.

eri<-read.table("D:/efi/er2.txt",header=T) grad1<-eri
grad1$fit<-fitted(gradi)
grad1$res<-resid(gradi)
grad.fit<-function(data){
mod<-lm(data$huevrel~data$slongitud*data$sabdomen*data$saparcap, weights=data$presencia, data=eri)
c(coef(mod),
summary(mod)$coef[,2]^2)}

gmodfun<-function(d,i){
d$huevrel<-d$fit+d$res[i]
grad.fit(d)}
grandi<-boot(grad1,gmodfun, R=999)
grandi

I was wondering if there is a way to estimate p-values in order to know wich independent variables are significant. Would be correct to add the bias to the regression coefficients and divide with de SE to obtain a t value and use pt function eg (1 - pt(abs(1.51),211))*2 in order to get the p values?

Thanks a lot for your help.

Roberto
I use R 2.1, Windows XP.  

Departamento de Biologia Evolutiva
Instituto de Ecología, A.C.
Km 2.5 Carretera antigua a Coatepec
Ap. Postal 63 (excepto mensajería)
Xalapa, Veracruz 91000
MEXICO
Tel. (52)(228)8421800 ext.3009  



Instituto de Ecología, A. C.
http://www.ecologia.edu.mx

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 May 26 14:16:06 2005

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