[R] Gains package installation error

2015-01-02 Thread Rodica Coderie via R-help
I am trying to install the Gains package in R Studio Version 3.1.2 like this:  install.packages("gains")The following warnings appear: InternetOpenUrl failed: 'The server name or address could not be resolved'Warning in install.packages :  unable to access index for repository http://www.stats.o

[R] Export chaid decision tree rules

2015-01-03 Thread Rodica Coderie via R-help
Hello, Can the decisions tree rules be exported? Along with the probabilities associated with each node?For example, I've created a CHAID decision with a target variable RESPONSE (YES/NO). I have 17 inner nodes with 19 terminal nodes. How which terminal node has the highest probability of YES an

Re: [R] Export chaid decision tree rules

2015-01-03 Thread Rodica Coderie via R-help
mius wrote: > On Jan 3, 2015, at 1:21 AM, Rodica Coderie via R-help wrote: > >> Hello, >> Can the decisions tree rules be exported? Along with the probabilities >> associated with each node?For example, I've created a CHAID decision with a >> target variable RES

[R] #library("CHAID") - Cross validation for chaid

2015-01-05 Thread Rodica Coderie via R-help
Hello, Is there an option of cross validation for CHAID decision tree? An example of CHAID is below: library("CHAID") example("chaid", package = "CHAID") How can I use a 10 fold cross-validation for CHAID? I've read that caret package is to cross-validate on many times of models, but model CHA

[R] #library(CHAID) - export associated probabilities and rules for each row

2015-01-05 Thread Rodica Coderie via R-help
Hello, How can I export the sample data frame below -USvoteS with the associated probabilities and rules for each row? library("CHAID") example("chaid", package = "CHAID") To be more specific, for each of 1000 rows of the USvoteS data frame I want to see in which node is that row in (what ar

Re: [R] #library("CHAID") - Cross validation for chaid

2015-01-07 Thread Rodica Coderie via R-help
nvert the factors to dummy variables mod <- train(x = USvoteS[,-1], y = USvoteS$vote3, method = modelInfo, trControl = trainControl(method = "cv")) Max On Mon, Jan 5, 2015 at 7:11 AM, Rodica Coderie via R-help wrote: > Hello, > > Is there an option of

Re: [R] #library("CHAID") - Cross validation for chaid

2015-01-07 Thread Rodica Coderie via R-help
teS <- USvote[sample(1:nrow(USvote), 1000),] ## You probably don't want to use `train.formula` as ## it will convert the factors to dummy variables mod <- train(x = USvoteS[,-1], y = USvoteS$vote3, method = modelInfo, trControl = trainControl(method = "cv&q

[R] #library(party) - Compare predicted results for ctree

2015-02-16 Thread Rodica Coderie via R-help
Hello, I've created a ctree model called fit using 15 input variables for a factor predicted variable Response (YES/NO). When I run the following : table(predict(fit2), training_data$response) I get the following result: NO YES NO 48694 480 YES 0 0 It appears that the NO re