Displaying 20 results from an estimated 20000 matches similar to: "cv.glm: delta squared --> squared q"
2008 Mar 06
0
glm.cv delta value?
Hi!
When I use the glm.cv function I get a value called "delta" which is explained as the "raw cross-validation estimate of prediction error". I recently found a formula for that term in literature where it is defined as:
alpha = 1 / N * sum over( yi - yi,pred,CV)
Well it is somehow similar to the RSS for R2 and the PRESS for Q2.
But this delta value increases with
2005 Dec 29
1
function cv.glm in library 'boot'
Hi, everyone,
I have a question regarding function cv.glm in library
'boot'.
Basically cv.glm can calculate the estimated K-fold
cross-validation prediction error for generalized
linear models. My question is this: if I am fitting a
logit model, what kind of threshold will it use to
calculate the prediction error (saved in 'delta')? It
will use 0.5 as the threshold or pick a
2007 Jul 20
1
cv.glm error function
I have a couple quick questions about the use of cv.glm for
cross-validation.
1. If we have a Poisson GLM with counts Y~Poisson(mu) and
ln(mu)=beta0+beta1*x1+..., is the prediction error (delta) that is output
from cv.glm provided in terms of the counts (y) or the (mu)?
2. Can cv.glm be used for negative binomial models fit using glm.nb? It
appears to work, but since NB models aren't
2010 Jul 05
0
R squared from cv.lm
Hello,
I used the cv.lm function to validate a linear regression model
fit<-lm(y ~ x1+x2+x3+x4+0, data=mydata) without intercept
I tried to validate the model by performing a leave one out cross validation
procedure usinfg the cvlm function:
CVlm(df=mydata, fit, m=196)
But how can I get the adjusted R? from the output of this function.
Or is there any other function to
2005 Jul 25
5
passing formula arguments cv.glm
I am trying to write a wrapper for the last example in help(cv.glm) that
deals with leave-one-out-cross-validation (LOOCV) for a logistic model.
This wrapper will be used as part of a bigger program.
Here is my wrapper funtion :
logistic.LOOCV.err <- function( formu=NULL, data=NULL ){
cost.fn <- function(cl, pred) mean( abs(cl-pred) > 0.5 )
glmfit <- glm(
2007 May 12
0
There might be something wrong with cv.lm(DAAG)
Hi, everyone
When I was using cv.lm(DAAG) , I found there might be something wrong with
it. The problem is that we can't use it to deal with a linear model with
more than one predictor variable. But the usage documentation
hasn't informed us about this.
You can find it by excuting the following code:
xx=matrix(rnorm(20*3),ncol=3)
bb=c(1,2,0)
yy=xx%*%bb+rnorm(20,0,10)
2011 Jul 22
1
cv.glm and "longer object length is not a multiple of shorter object length" error
Hi,
I've done some searching where others have had trouble with this error (or
"warning" actually), but I'm unable to solve my problem. I have a data
sheet with 13 columns and 36 rows. Each column has exactly the same number
of rows. I've created glms and now want to do cross-validation on 2 of
them. Please be gentle-- I'm new to R (and statistics, too, for that
2009 Jan 20
5
Error message from CV.GLM
Dear list members.
I have problems with the usage of cv.glm from the boot package. Here are some parts of the script I wanted to use:
data <- read.table("selected_2D.csv", header=TRUE, sep=",")
?
glm.fitted <- glm("ydata$ y ~ 1 + density + vsurf_ID6 + vsurf_S ", data=data)
error <- cv.glm(data=data, glm.fitted, K=6)
ydata$y is a separate data set, where
2013 Nov 21
0
Cost function in cv. glm for a fitted logistic model when cutoff value of the model is not 0.5
I have a logistic model fitted with the following R function:
glmfit<-glm(formula, data, family=binomial)
A reasonable cutoff value in order to get a good data classification (or
confusion matrix) with the fitted model is 0.2 instead of the mostly used
0.5.
And I want to use the `cv.glm` function with the fitted model:
cv.glm(data, glmfit, cost, K)
Since the response in the fitted
2006 Feb 16
1
cv.glm function error message in a loop
Dear list,
I am modelling fish distributions using the glm-function followed by the
step-function, and then want to cross-validate the model via the
cv.glm-function from the {boot} package. I am working on fish
distributions on coral reefs. The code I have works for one fish
species. Since I have 227 fishes, I wrote a loop. Now the
cv.glm-function comes up with an error message: "Error in
2012 Nov 30
0
what is the cost in cv.glm?
Hi,
I have a question regarding the cv.glm function in the package boot. What is
exactly the cost? Is it the threshold value for an estimated value to be
classified as either 0 or 1? I have troubles understanding the explanation
in R. Lets say I want all estimations >0.65 to be classified as 1s and <0.35
as 0s, how do I write that? And if the cost is something else, how do I set
the
2012 Apr 10
1
Package boot, funtion cv.glm
Hey all,
I need some help with a cross validation. I'm new with R and as well with
statistics. I had a group work to create a tool for remote sensing class
that extracts the best bands of hyperspectral satellite images that describe
vegetation. Its a regression between a linear function of using a normalized
differenced index (i-j)/(i+j) while i and j are the bands (in the data these
are the
2023 Nov 03
0
new cv package: cross-validation of regression models
Georges Monette and I would like to announce a new package, cv, now on
CRAN, which implements cross-validation of regression models.
Some of the functions supplied by the package:
- cv() is a generic function with a default method and computationally
efficient "lm" and "glm" methods, along with a method for a list of
competing models. There are also experimental
2023 Nov 03
0
new cv package: cross-validation of regression models
Georges Monette and I would like to announce a new package, cv, now on
CRAN, which implements cross-validation of regression models.
Some of the functions supplied by the package:
- cv() is a generic function with a default method and computationally
efficient "lm" and "glm" methods, along with a method for a list of
competing models. There are also experimental
2005 Mar 15
2
cv.glm {boot}
I am try to cross validate some logistic regressions. cv.glm allows me to do this randomly but since I have data over a number of years and over a number of distince areas, I would like to cross-validate temporarly and spatially. I've already attached the temporal and spatial attributes to my data, but I'm unsure as to how to achieve this, as it seems I can't use cv.glm for this
2007 May 21
0
Is this a bug in cv.lm(DAAG) ?
Dear R-list,
I'm not sure what I've found about a function in DAAG package is a bug.
When I was using cv.lm(DAAG) , I found there might be something wrong with
it. The problem is that we can't use it to deal with a linear model with
more than one predictor variable. But the usage documentation
hasn't informed us about this.
The code illustrates my discovery:
> library(DAAG)
2005 Nov 19
1
predicted values from cv.glm
Hi. Is there a way to get the values predicted from (leave-one-out)
cv.glm?
It seems like a useful diagnostic to plot observed vs. predicted values.
Thanks,
Jeff
****************************************
Jeffrey A. Stratford, Ph.D.
Postdoctoral Associate
331 Funchess Hall
Department of Biological Sciences
Auburn University
Auburn, AL 36849
334-329-9198
FAX 334-844-9234
2010 Aug 15
1
how to display delta AIC of all models
Dear all,
I am making model selection of generalised linear models based on delta
AIC,
using the command step(AIC).
Also, I would like to learn the explanatory powers of each independent
variable.
To phrase differently, it is in need to show the delta AIC of all models
rather than the final model with the least delta AIC.
Please kindly advise if it is possible to exhibit all delta AIC of
2011 Aug 24
1
How to do cross validation with glm?
Hi All,
I have a fitted model called glm.fit which I used glm and data dat is my data frame
pred= predict(glm.fit, data = dat, type="response")
to predict how it predicts on my whole data but obviously I have to do cross-validation to train the model on one part of my data and predict on the other part. So, I searched for it and I found a function cv.glm which is in package boot.
2010 Jun 09
1
Finding the bootstrapped coefficient of variation and the stderr on the CV(boot)
Dear R-Helpers,
I am trying to bootstrap the coefficient of variation on a suite of
vectors, here I provide an example using one of the vectors in my
study. When I ran this script with the vector x <-c(0.625,
0.071428571, 0.133333333, 0.125, 0), it returned CV(boot) [the second
one], and stderr(boot) [the second one] without problem. However, when
I ran it with the vector in the