similar to: Different cp values in rpart() using plotcp() and printcp()

Displaying 20 results from an estimated 300 matches similar to: "Different cp values in rpart() using plotcp() and printcp()"

2003 Sep 29
1
CP for rpart
Hi All, I have some questions on using library rpart. Given my data below, the plotcp gives me increasing 'xerrors' across different cp's with huge xstd (plot attached). What causes the problem or it's not a problem at all? I am thinking 'xerror's should be decreasing when 'cp' gets smaller. Also what the 'xstd' really tells us? If the error bars for
2001 Nov 14
3
rpart:plotcp doesn't allow ylim argument (PR#1171)
Full_Name: Gregory R. Warnes Version: R 1.3.1 OS: Solaris 2.8 Submission from: (NULL) (192.77.198.200) rpart library version 3.1-2 Error message: > plotcp(fit.thirds.1,ylim=c(0.7,1.5)); Error in plot.default(ns, xerror, axes = FALSE, xlab = "cp", ylab = "X-val Relative Error", : formal argument "ylim" matched by multiple actual arguments > This can be
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page ( http://www.statmethods.net/advstats/cart.html) but my cross-validation errors increase instead of decrease (same thing happens with an unrelated data set). Why does this happen? Am I doing something wrong? # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start,
2012 Aug 14
1
Random effects in gam (mgcv 1.7-19)
Hi, I am using the gam function in the mgcv package, I have random effects in my model (bs="re") this has worked fine, but after I updated the mgcv package to version 1.7-19 I recive an error message when I run the model. > fit1<-gam(IV~s(RUTE,bs="re")+s(T13)+s(H40)+factor(AAR)+s(V3)+s(G1)+s(H1)+s(V1)+factor(LEDD),data=data5,method="ML") > summary.gam(fit1)
2008 Sep 26
2
axis in a normal plot
Hi I have a small problem, I'm new in using R, so I hope you can help me... I'm running a logistic regression model and want to do a nice plot. The plot I have made is done a plot with the command jitter: plot(jitter(overto$age[overto$sex=="F"]),jitter(overto$neg.pos[overto$sex=="F"]),xlab="age",ylab="neg and pos") my responsvariable is positive
2010 Aug 03
1
R: classification tree model!
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100803/9fb28807/attachment.pl>
2012 Jul 13
5
HLOOKUP in R
Hi, Is there a function similar to excel's hlookup in R ? Thanks, Silje
2012 Nov 28
2
Plot with residuals in mgcv
Hi, I am using the mgcv package (version 1.7-22.) running the model works fine, but when I want to have a plot with residuals I get an error. fit29<-gam(IV~s(G3)+s(V3)+factor(AAR)+s(D3)+s(RUTE,bs="re"),data=subsf,gamma=1.4,method="ML") plot(fit29,residuals=T) Error in X[, first:last] %*% object$coefficients[first:last] : non-conformable arguments does some one know
2006 Sep 25
2
rpart
Dear r-help-list: If I use the rpart method like cfit<-rpart(y~.,data=data,...), what kind of tree is stored in cfit? Is it right that this tree is not pruned at all, that it is the full tree? If so, it's up to me to choose a subtree by using the printcp method. In the technical report from Atkinson and Therneau "An Introduction to recursive partitioning using the rpart
2010 Nov 04
5
Sorting data from one column with strings
Hello, I have tried to find this out some other way, but unsuccessful I have to try this list. I assume this should be quite simple. I have a dataset with 4 columns, "Sample_no", "Species", "Nitrogen", "Carbon" in csv format. In the species column I have many different species with varying number of obs per species Eg "Sample_no"
2006 Nov 02
1
Question on cross-validation in rpart
Hi R folks, I am using R version 2.2.1 for Unix. I am exploring the rpart function, in particular the rpart.control parameter. I have tried using different values for xval (0, 1, 10, 20) leaving other parameters constant but I receive the same tree after each run. Is the10 fold cross-validation default still running every time? I would expect the trees to change at least a little when I
2009 Aug 29
3
Joypad axis not being detected in wine.
I've searched for this all over the place and couldn't find anyone having the same problem. I have a Logitech Wingman wireless controller. As far as I can tell from doing various calibrations on it, the kernel and all other programs detect all axis. However when trying to map the controller in wine, it detects all axes, including the slider bar at the top right, but the Y axsis on the
2008 Dec 17
1
pruning trees using rpart
Hi, I am using the packages tree and rpart to build a classification tree to predict a 0/1 outcome. The package rpart has the advantage that the function plotcp gives a visual representation of the cross-validation results with a horizontal line indicating the 1 standard error rule, i.e. the recommendation to select the most parsimonious model (the smallest tree) whose error is not more than one
2001 Sep 14
0
rpart or Postscript problem?
I've run into another postscript/rpart problem unrelated to the issues I've mentioned in a previous query. I'm using 1.3.1 on a Win2K box. >plotcp(some.rpart.object) draws a very nice plot on the windows graphic device. If I save this as a postscript file, either by opening a postscript device before calling plotcp, or by saving the graphics window as a postscript file, the
2010 Oct 12
2
repeating an analysis
Hi All, I have to say upfront that I am a complete neophyte when it comes to programming. Nevertheless I enjoy the challenge of using R because of its incredible statistical resources. My problem is this .........I am running a regression tree analysis using "rpart" and I need to run the calculation repeatedly (say n=50 times) to obtain a distribution of results from which I will pick
2012 Mar 26
1
NA in R package randomForest
I have a question regarding NA in randomForest (in R). I have a dataset which include both numerical and non-numerical variables, and the data includes some NA. I tried to use na.roughfix but then i get an error message "na.roughfix only works for numeric or factor". I also tried rfImpute but this does not work either because I have some NA in my response variable. Does anyone have som
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings, I am using rpart for classification with "class" method. The test data is the Indian diabetes data from package mlbench. I fitted a classification tree firstly using the original data, and then exchanged the order of Body mass and Plasma glucose which are the strongest/important variables in the growing phase. The second tree is a little different from the first one. The
2009 May 22
1
bug in rpart?
Greetings, I checked the Indian diabetes data again and get one tree for the data with reordered columns and another tree for the original data. I compared these two trees, the split points for these two trees are exactly the same but the fitted classes are not the same for some cases. And the misclassification errors are different too. I know how CART deal with ties --- even we are using the
2010 May 11
1
how to extract the variables used in decision tree
HI, Dear R community, How to extract the variables actually used in tree construction? I want to extract these variables and combine other variable as my features in next step model building. > printcp(fit.dimer) Classification tree: rpart(formula = outcome ~ ., data = p_df, method = "class") Variables actually used in tree construction: [1] CT DP DY FC NE NW QT SK TA WC WD WG WW
2004 Jun 04
1
rpart
Hello everyone, I'm a newbie to R and to CART so I hope my questions don't seem too stupid. 1.) My first question concerns the rpart() method. Which method does rpart use in order to get the best split - entropy impurity, Bayes error (min. error) or Gini index? Is there a way to make it use the entropy impurity? The second and third question concern the output of the printcp() function.