Re: [R] Prediction Error Calculation

2009-10-29 Thread quaildoc

Any help would be appreciated.

quaildoc wrote:
 
 Hello List,
 
 I am fitting a logistic regression model for some presence/absence type
 data.  I have numerous covariates I am fitting to explain variation, and I
 am using AIC to rank models.  However, I would like to report how well my
 best model (s) do at prediction.  I have looked over the archives and the
 web and have come up with something that gives me what I think is the mean
 prediction error, BUT I am not sure of that. I am sort of unfamiliar with
 these types of statistics.  Here is my code:
 
 
 metrics.global-glm(Type~MPI+IJI+ED+PRD+class2+class3+class5,
 family=binomial, data=metrics)## ##Type is my binary response 0 or 1
 
 muhat-metrics.global$fitted.values
 ##assigns the fitted values a name muhat
 global.diag-glm.diag(metrics.global)
 ##creates a the diagnostic values
 cv.err-mean((metrics.global$y-muhat)^2/(1-global.diag$h)^2)
 ###calculates cv.err
 cv.err
 
 
 My main problem is I am unsure how to interpret what cv.err means for my
 model.  I know that h is a leverage statistic for each observation.  I
 would appreciate some interpretation clarification.
 
 Thank you.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Prediction-Error-Calculation-tp26031236p26113145.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Prediction Error Calculation

2009-10-26 Thread quaildoc

Any suggestions?

quaildoc wrote:
 
 Hello List,
 
 I am fitting a logistic regression model for some presence/absence type
 data.  I have numerous covariates I am fitting to explain variation, and I
 am using AIC to rank models.  However, I would like to report how well my
 best model (s) do at prediction.  I have looked over the archives and the
 web and have come up with something that gives me what I think is the mean
 prediction error, BUT I am not sure of that. I am sort of unfamiliar with
 these types of statistics.  Here is my code:
 
 
 metrics.global-glm(Type~MPI+IJI+ED+PRD+class2+class3+class5,
 family=binomial, data=metrics)## ##Type is my binary response 0 or 1
 
 muhat-metrics.global$fitted.values
 ##assigns the fitted values a name muhat
 global.diag-glm.diag(metrics.global)
 ##creates a the diagnostic values
 cv.err-mean((metrics.global$y-muhat)^2/(1-global.diag$h)^2)
 ###calculates cv.err
 cv.err
 
 
 My main problem is I am unsure how to interpret what cv.err means for my
 model.  I know that h is a leverage statistic for each observation.  I
 would appreciate some interpretation clarification.
 
 Thank you.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Prediction-Error-Calculation-tp26031236p26066845.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Prediction Error Calculation

2009-10-23 Thread quaildoc

Hello List,

I am fitting a logistic regression model for some presence/absence type
data.  I have numerous covariates I am fitting to explain variation, and I
am using AIC to rank models.  However, I would like to report how well my
best model (s) do at prediction.  I have looked over the archives and the
web and have come up with something that gives me what I think is the mean
prediction error, BUT I am not sure of that. I am sort of unfamiliar with
these types of statistics.  Here is my code:


metrics.global-glm(Type~MPI+IJI+ED+PRD+class2+class3+class5,
family=binomial, data=metrics)## ##Type is my binary response 0 or 1

muhat-metrics.global$fitted.values
##assigns the fitted values a name muhat
global.diag-glm.diag(metrics.global)
##creates a the diagnostic values
cv.err-mean((metrics.global$y-muhat)^2/(1-global.diag$h)^2)
###calculates cv.err
cv.err


My main problem is I am unsure how to interpret what cv.err means for my
model.  I know that h is a leverage statistic for each observation.  I would
appreciate some interpretation clarification.

Thank you.




-- 
View this message in context: 
http://www.nabble.com/Prediction-Error-Calculation-tp26031236p26031236.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.