[R] CTree to obtain segmented data

2016-04-30 Thread Preetam Pal
Hi guys, I have a dataset obtained as: mydata <- read.csv("data.csv", header = TRUE) which contains the variable 'y' (y is binary 0 or 1) and some regressor variables. I want to apply the ctree technique on this data with the following requirements: 1> Of course I would need the tree plot (which I

Re: [R] ctree (party) - select a specific variable in the first split

2013-04-02 Thread Salvatore Loguercio
Hi Achim, Thank you for the quick suggestion. I actually did the first split manually, then grew two trees in the two subsets, it worked. Best, Sal Hello, My question is related to ctree() function from the library 'party'. See fortune(58). Yeah, package 'party' - sorry for the confusion

Re: [R] ctree (party) - select a specific variable in the first split

2013-04-02 Thread Achim Zeileis
On Mon, 1 Apr 2013, Salvatore Loguercio wrote: Hello, My question is related to ctree() function from the library 'party'. See fortune(58). Is there a way to force ctree() to use a specific variable in the first split? No way that does this automatically. I am asking because the first sp

[R] ctree (party) - select a specific variable in the first split

2013-04-01 Thread Salvatore Loguercio
Hello, My question is related to ctree() function from the library 'party'. Is there a way to force ctree() to use a specific variable in the first split? I am asking because the first split contains two variables with very similar scores, and choosing the alternative variable would induce a t

Re: [R] ctree

2012-11-14 Thread Achim Zeileis
Did you try the example that I sent you? I think it does what you ask for... (sent from mobile phone)mia88 wrote:Hey thanks for your help. Im afraid its a little bit too complicated for me.. Before I do al lot of research in the next days to finally understand it I would like to make sure that

Re: [R] ctree

2012-11-14 Thread mia88
Hey thanks for your help. Im afraid its a little bit too complicated for me.. Before I do al lot of research in the next days to finally understand it I would like to make sure that it does help me with my problem. Maybe I explain it once again : For example in the first node I can read that group

Re: [R] ctree

2012-11-14 Thread Achim Zeileis
On Wed, 14 Nov 2012, mia88 wrote: Hello, I plotted a nice tree with "ctree" . It shows 3 nodes with the prediction of my 2 groups. (see picture) Unfortunately I need a larger scale to read the exact prediction of my groups to get the specificity and sensitivity. I tried to change the scale wit

[R] ctree

2012-11-14 Thread mia88
Hello, I plotted a nice tree with "ctree" . It shows 3 nodes with the prediction of my 2 groups. (see picture) Unfortunately I need a larger scale to read the exact prediction of my groups to get the specificity and sensitivity. I tried to change the scale with "axis" but it didn't work, my guess b

Re: [R] Ctree plot

2012-08-09 Thread Weidong Gu
Hi, You may want to check grid.arrange in gridExtra package. Weidong On Thu, Aug 9, 2012 at 7:36 AM, rodrock wrote: > HI everybody! > > Has anybody figure out how would be possible to plot several ctree plots > beside each other? > I would really appreciate it > My idea would be like this, but

[R] Ctree plot

2012-08-09 Thread rodrock
HI everybody! Has anybody figure out how would be possible to plot several ctree plots beside each other? I would really appreciate it My idea would be like this, but the par() function seem to be lower in hierarchy Thanks in advance # libra

Re: [R] ctree for suvival analysis problem

2012-05-17 Thread ofraam
Thanks David!!! Sorry for the stupid question... Seems like I still have issues with pec, but I will work on it some more... -- View this message in context: http://r.789695.n4.nabble.com/ctree-for-suvival-analysis-problem-tp4630362p4630408.html Sent from the R help mailing list archive at Nabbl

Re: [R] ctree for suvival analysis problem

2012-05-17 Thread David Winsemius
On May 17, 2012, at 11:04 AM, ofraam wrote: Thanks very much Achim! I was indeed using "pec" which requires "rms"... I see now that the old version of pec that I used didn't require rms and therefore I had no problem.. I'm guessing I don't need the rms methods for my use of pec, but am no

Re: [R] ctree for suvival analysis problem

2012-05-17 Thread ofraam
Thanks very much Achim! I was indeed using "pec" which requires "rms"... I see now that the old version of pec that I used didn't require rms and therefore I had no problem.. I'm guessing I don't need the rms methods for my use of pec, but am not sure how I can remove the dependency or alternativ

Re: [R] ctree for suvival analysis problem

2012-05-17 Thread Achim Zeileis
On Thu, 17 May 2012, ofraam wrote: Hi All, I'm using the party package to grow conditional inference trees for survival analysis. When I used party version party_0.9-9991 everything worked well, but when I update to party_1.0-2 (due to using 64bit R), I get an error. For simplicity I will show

[R] ctree for suvival analysis problem

2012-05-17 Thread ofraam
Hi All, I'm using the party package to grow conditional inference trees for survival analysis. When I used party version party_0.9-9991 everything worked well, but when I update to party_1.0-2 (due to using 64bit R), I get an error. For simplicity I will show the error I get for the example in t

[R] ctree() crossvalidation

2012-03-17 Thread Franziska Rupprecht
Dear all, I use the function ctree() from the party library to calculate classification tree models. I want to validate models by 10-fold cross validation and estimate mean and standard deviation of correct classification rates (CCR) from the10 resulting confusion matrices. So far I use the “write

Re: [R] ctree question

2012-01-18 Thread Achim Zeileis
On Wed, 18 Jan 2012, seanstcl...@verizon.net wrote: Hello. I have used the "party" package to generate a regression tree as follows: >origdata<-read.csv("origdata.csv") >ctrl<-ctree_control(mincriterion=0.99,maxdepth=10,minbucket=10) >test.ct<-ctree(Y~X1+X2+X3,data=origdata,control=

[R] ctree question

2012-01-18 Thread seanstclair
Hello. I have used the "party" package to generate a regression tree as follows: >origdata<-read.csv("origdata.csv") >ctrl<-ctree_control(mincriterion=0.99,maxdepth=10,minbucket=10) >test.ct<-ctree(Y~X1+X2+X3,data=origdata,control=ctrl) The above works fine. Orig data was my

Re: [R] R, ctree and categorical variables

2011-07-29 Thread Achim Zeileis
On Thu, 28 Jul 2011, seanstcl...@verizon.net wrote: I am running the ctree function in R. My data has about 10 variables, many of which are categorical. 2 of the categorical variables have many levels (one has 900 levels, another has 1,000 levels). As an example, 1 of these variabl

[R] R, ctree and categorical variables

2011-07-28 Thread seanstclair
I am running the ctree function in R. My data has about 10 variables, many of which are categorical. 2 of the categorical variables have many levels (one has 900 levels, another has 1,000 levels). As an example, 1 of these variables is disease code and is structured as A, B, C,

Re: [R] ctree and survival problem

2011-04-28 Thread moleps
Yup, thats the culprit. Thx. //M On 28. apr. 2011, at 18.36, Achim Zeileis wrote: > On Thu, 28 Apr 2011, moleps wrote: > >> sessionInfo yields the following: > > OK, the "Design" package causes the problem here. When you load the Design > package, it provides a new Surv() and related methods

Re: [R] ctree and survival problem

2011-04-28 Thread Achim Zeileis
On Thu, 28 Apr 2011, moleps wrote: sessionInfo yields the following: OK, the "Design" package causes the problem here. When you load the Design package, it provides a new Surv() and related methods. This clashes with the computations of ctree() based on Surv(). So it's better not to load bo

Re: [R] ctree and survival problem

2011-04-28 Thread moleps
sessionInfo yields the following: > sessionInfo() R version 2.11.1 (2010-05-31) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats4tcltk splines grid stats graphics grDevices utils datasets metho

Re: [R] ctree and survival problem

2011-04-28 Thread Jonathan Daily
It would help people who know more about R's guts than me if you posted your sessionInfo() output and exactly what commands produced your error. It is also recommended that you try simply upgrading R to the latest version and see if you get an error with the latest version of 'party'. My guess is

[R] ctree and survival problem

2011-04-27 Thread moleps
Forgot to mention that the ctree command is from the party library. //M __ 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,

[R] ctree and survival problem

2011-04-27 Thread moleps
Dear all, I was intrigued by the ctree command and wanted to check it out. I first ran the demo with example(ctree) and did get the survival graphs in the end. Upon doing this with my own data and yielding a "Invalid operation on a survival time" I tried to rerun example(ctree) and now I also g

Re: [R] Ctree Model Variables

2011-03-24 Thread Achim Zeileis
On Thu, 24 Mar 2011, jdanielnd wrote: Hello! I am not familiar to deal with S4 objects in R, so this question can be stupid, but I hope I can get an answer. :P I'm trying to extract what are the response and explanatory variables from a Binary Tree and Random Forest. I could already extract t

[R] Ctree Model Variables

2011-03-24 Thread jdanielnd
Hello! I am not familiar to deal with S4 objects in R, so this question can be stupid, but I hope I can get an answer. :P I'm trying to extract what are the response and explanatory variables from a Binary Tree and Random Forest. I could already extract the response variable from a Binary Tree u

Re: [R] Ctree Question

2010-07-09 Thread Achim Zeileis
On Fri, 9 Jul 2010, steve_fried...@nps.gov wrote: Hello, I've been using ctree and have developed a 55 node - 28 terminal solution. As can be imagined, the plot is difficult to travel down each of the major branches. I've read the help files for ctree I saw where terminal nodes can be color c

Re: [R] Ctree Question

2010-07-09 Thread Horace Tso
re colored. ?dendrapply HTH. H -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of steve_fried...@nps.gov Sent: Friday, July 09, 2010 10:22 AM To: r-help@r-project.org Subject: [R] Ctree Question Hello, I've been using ctree and

[R] Ctree Question

2010-07-09 Thread Steve_Friedman
Hello, I've been using ctree and have developed a 55 node - 28 terminal solution. As can be imagined, the plot is difficult to travel down each of the major branches. I've read the help files for ctree I saw where terminal nodes can be color coded. plot(airct, type = "simple") > plot(airct, te

Re: [R] ctree ordering nodes

2010-07-07 Thread Achim Zeileis
On Tue, 6 Jul 2010, Paras Sharma wrote: Hello, When using the ctree function, from library (party) what is the syntax to order the Variables in the nodes in a specific way? For example, how would I specify to make a binary come first, then a continuous variable? Not sure what you mean here.

[R] ctree ordering nodes

2010-07-06 Thread Paras Sharma
Hello, When using the ctree function, from library (party) what is the syntax to order the Variables in the nodes in a specific way? For example, how would I specify to make a binary come first, then a continuous variable? Also is there a way to force ctree to show variables which are

Re: [R] ctree

2010-06-21 Thread Steve_Friedman
10:03 cc AMr-help@r-project.org Subject Re: [R] ctree

Re: [R] ctree

2010-06-21 Thread Joris Meys
You can't get them out of the plot function, but you can calculate them from the fit. This code returns a matrix with the appropriate rownames and colnames. x1 <- treeresponse(iris.ct) p <- matrix( unlist(unique(x1)), ncol=3, byrow=T ) colnames(p) <- levels(iris$Species) rowname

Re: [R] ctree

2010-06-21 Thread Achim Zeileis
On Mon, 21 Jun 2010, steve_fried...@nps.gov wrote: Hello, This is a re-submittal of question I submitted last week, but haven't rec'd any responses. I need to extract the probabilities used to construct the barplots displayed as part of the graph produced by plot("ctree"). For example, libr

[R] ctree

2010-06-21 Thread Steve_Friedman
Hello, This is a re-submittal of question I submitted last week, but haven't rec'd any responses. I need to extract the probabilities used to construct the barplots displayed as part of the graph produced by plot("ctree"). For example, library(party) iris.ct <- ctree(Species ~ . , data = iris

Re: [R] ctree - party package multivariate response variables

2010-03-09 Thread Henric (Nilsson) Winell
On 2010-03-09 04:40, valeriano.parravic...@unige.it wrote: Hi, I have a problem with ctree of party package. I have data on distribution of more than one species (about 50 species) and I would like identify the relation of this multivariate object (species distribution) with a number of explanat

Re: [R] ctree - party package multivariate response variables

2010-03-08 Thread Peter Ehlers
Your description of your data isn't clear to me. What are the values in column 2, for example? Are you trying to construct regression or classification trees? A reproducible example would really help. -Peter Ehlers On 2010-03-08 20:40, valeriano.parravic...@unige.it wrote: Hi, I have a probl

[R] ctree - party package multivariate response variables

2010-03-08 Thread valeriano . parravicini
Hi, I have a problem with ctree of party package. I have data on distribution of more than one species (about 50 species) and I would like identify the relation of this multivariate object (species distribution) with a number of explanatory variables. rs is the name of my dataframe containing the

Re: [R] ctree (party) changing font sizes in plots

2009-11-20 Thread Achim Zeileis
On Fri, 20 Nov 2009, Sam Thomas wrote: When plotting Binary Trees (ctree) from the party package, is there a way to adjust the font sizes of the leaves? Currently, this is not implemented in "party". In interactive usage it is not easy to change the fontsize. If you're printing to PDF, you co

[R] ctree (party) changing font sizes in plots

2009-11-20 Thread Sam Thomas
When plotting Binary Trees (ctree) from the party package, is there a way to adjust the font sizes of the leaves? require(party) irisct <- ctree(Species ~ ., data = iris) plot(irisct) I want to adjust the font sizes for "Node 2", "Node 5", etc. I'd also like to be able to adjust the fo

[R] ctree from Java via Rserve

2009-03-13 Thread Maxl18
Hi, I want to run the R-function ctree (package party) from Java over Rserve with the following Java-Code: try{ RConnection v = new RConnection(); v.voidEval("library(party)"); v.voidEval("try(load(\"C:\\Documents and Settings\\daten2.rda\"))"); v.voidEval("try(pdf(\"C:\\Documents and Settings\\t

[R] ctree to rules conversion function

2008-10-31 Thread Sharma, Dhruv
Hi, Similar to the R function of converting rpart into rules (see example: http://books.huihoo.org/data-mining-desktop-survival-guide/Convert_Tree. html_ is there any open code to convert ctree (from party) into rule format? This would be very useful. thanks Dhruv Dhruv Sharma

Re: [R] ctree (party) plot meaning question

2008-06-30 Thread Gavin Simpson
On Mon, 2008-06-30 at 10:41 -0700, Birgitle wrote: > I tried to use ctree but am not sure about the meaning of the plot. > > My.data.ct<-ctree(Resp~., data=My.data) > plot(My.data.ct) > > My data.frame contains 88 explanatory variables (continous,ordered/unordered > multistate,count data) and one

[R] ctree (party) plot meaning question

2008-06-30 Thread Birgitle
I tried to use ctree but am not sure about the meaning of the plot. My.data.cf<-ctree(Resp~., data=My.data) plot(FemMalSex_NAavoid88.ct) My data.frame contains 88 explanatory variables (continous,ordered/unordered multistate,count data) and one response with two groups. In the plot are only two