Roberto Edmundo Munguia Steyer
2005-May-26 04:36 UTC
[R] estimating p values bootstrap regression
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