similar to: Error of Cross Validation

Displaying 20 results from an estimated 200 matches similar to: "Error of Cross Validation"

2010 Jan 21
3
cross validation function translated from stata
Hi, everyone: I ask for help about translating a stata program into R. The program perform cross validation as it stated. #1. Randomly divide the data set into 10 sets of equal size, ensuring equal numbers of events in each set #2. Fit the model leaving out the 1st set #3. Apply the fitted model in (2) to the 1st set to obtain the predicted probability of a prostate cancer diagnosis. #4. Repeat
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE) pena.fit2
2012 Nov 23
1
caret train and trainControl
I am used to packages like e1071 where you have a tune step and then pass your tunings to train. It seems with caret, tuning and training are both handled by train. I am using train and trainControl to find my hyper parameters like so: MyTrainControl=trainControl( method = "cv", number=5, returnResamp = "all", classProbs = TRUE ) rbfSVM <- train(label~., data =
2009 Sep 12
2
could not find function "Varcov" after upgrade of R?
After upgrading R to 2.9.2, I can't use the anova() fuction. It says "could not find function "Varcov" ". What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[alternative HTML version deleted]]
2011 Apr 22
2
How to answer the question about transitive correlation?
Hi, everyone. I know it may be a basic statistical question. But I can't find a good answer. I have a question raised by one of the reviewers. Factor A expression was strongly correlated with B expression (chi-square) in this series. Prior reports by the same authors showed that B expression strongly correlated with survival (Log-rank). Please provide an explanation why then were the results
2009 Feb 16
1
Overdispersion with binomial distribution
I am attempting to run a glm with a binomial model to analyze proportion data. I have been following Crawley's book closely and am wondering if there is an accepted standard for how much is too much overdispersion? (e.g. change in AIC has an accepted standard of 2). In the example, he fits several models, binomial and quasibinomial and then accepts the quasibinomial. The output for residual
2011 Feb 17
1
cv.glmnet errors
Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5, nfolds=2) The error i get is: Error in if (outlist$msg != "Unknown error") return(outlist) : argument is of
2008 Dec 08
1
Multivariate kernel density estimation
I would like to estimate a 95% highest density area for a multivariate parameter space (In the context of anova). Unfortunately I have only experience with univariate kernel density estimation, which is remarkebly easier :) Using Gibbs, i have sampled from a posterior distirbution of an Anova model with k means (mu) and 1 common residual variance (s2). The means are independent of eachother, but
2010 Mar 30
1
Adding RcppFrame to RcppResultSet causes segmentation fault
Hi, I'm a bit puzzled. I uses exactly the same code in RcppExamples package to try adding RcppFrame object to RcppResultSet. When running it gives me segmentation fault problem. I'm using gcc 4.1.2 on redhat 64bit. I'm not sure if this is the cause of the problem. Any advice would be greatly appreciated. Thank you. Rob. int numCol=4; std::vector<std::string>
2011 Oct 12
1
CVbinary - Help
Hey, I need some help. I want to obtain a cross validation for a regression model (binary response) but I got an error with CVbinary. Well I did this: fit <- lm(resp ~ PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 + PC8 + PC9+PC10+PC11+PC12+PC13+PC14+PC15+PC16+PC17+PC18+PC19+PC20+PC21+PC22+PC23+PC24+PC25+PC26+PC27+PC28, data = dexp.cp, family=binomial()) CVbinary(fit) Error in sample(nfolds, m,
2011 Aug 11
1
Cv.glment question -- why giving me an error
Hi All,  I am trying to run cv.glmnet(x,y,family="multinomial", nfolds =4) and I only have 8 observations and the number of features I have is 1000, so my x matrix is 8 by 1000 and when I run the following, I get this error, I am not sure what is causing this problem.  Error in predmat[which, , seq(nlami)] = preds :   number of items to replace is not a multiple of replacement length Can
2011 Jan 16
1
Memory issues
Hi, I have read several threads about memory issues in R and I can't seem to find a solution to my problem. I am running a sort of LASSO regression on several subsets of a big dataset. For some subsets it works well, and for some bigger subsets it does not work, with errors of type "cannot allocate vector of size 1.6Gb". The error occurs at this line of the code: example <-
2013 Feb 11
1
how to plot growth chart like this
Dear R-users I want to generate a growth chart like this: http://php.med.unsw.edu.au/embryology/images/9/9a/WHO-XX_length_birth_to_2_years.png can you give some suggestions about the functions I should use? Thanks *Yao Zhu* *Department of Urology Fudan University Shanghai Cancer Center Shanghai, China* [[alternative HTML version deleted]]
2011 Jul 15
1
validate survival with val.surv
Dear R users: I want to externally validate a model with val.surv. Can I use only calculated survival (at 1 year) and actual survival? Or I needed the survival function and actual survival. Thanks *Yao Zhu* *Department of Urology Fudan University Shanghai Cancer Center Shanghai, China* [[alternative HTML version deleted]]
2010 Jun 21
1
Is there a similar R function like "stpower" in STATA
Dear R users: In stat, there is a "stpower" function for power analysis and sample-size determination in survival models. Is there a counterpart in R? Thanks Yao Zhu Department of Urology Fudan University Shanghai Cancer Center Shanghai, China [[alternative HTML version deleted]]
2009 Jul 26
1
How to add 95% confidence intervals in the calibration plot?
Dear experts: I am a newbie to R. Recently, I try to make prediction models with R and the Design library. I have read Prof. Harrell's excellent book. But I did not quite understand. I have two problems about the validation and calibration of prediction models: 1. Can someone explain the results outputted by the validate() function? How to get 95% of c-value of validate? 2. How to add 95% ci
2011 Sep 01
1
How to retrieve bias-corrected probability from calibrate.rms
Dear R users: In Prof. Harrell's library rms, calibrate.rms plot the Bias-corrected Probability and Apparent Probability. The latter one can be retrieved from class calibrate.default. But how to retrieve the former one. BW *Yao Zhu* *Department of Urology Fudan University Shanghai Cancer Center Shanghai, China* [[alternative HTML version deleted]]
2011 May 08
1
question about val.surv in R
Dear R users: I tried to use val.surv to give an internal validation of survival prediction model. I used the sample sources. # Generate failure times from an exponential distribution set.seed(123) # so can reproduce results n <- 1000 age <- 50 + 12*rnorm(n) sex <- factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens <- 15*runif(n) h
2013 Jul 17
1
glmnet on Autopilot
Dear List, I'm running simulations using the glmnet package. I need to use an 'automated' method for model selection at each iteration of the simulation. The cv.glmnet function in the same package is handy for that purpose. However, in my simulation I have p >> N, and in some cases the selected model from cv.glmet is essentially shrinking all coefficients to zero. In this case,
2010 Oct 13
1
bootstrap in pROC package
Dear useRs: I use pROC package to compute the bootstrap C.I. of AUC. The command was as follows: roc1<-roc(all$D,all$pre,ci=TRUE,boot.n=200) However, the result was: Area under the curve: 0.5903 95% CI: 0.479-0.7016 (DeLong) Why the C.I. was computed by the Delong Method? Yao Zhu Department of Urology Fudan University Shanghai Cancer Center Shanghai, China [[alternative HTML version