Re: [R] Extract a predictors form constparty object (CHAID output) in R

2013-10-17 Thread Christiaan Pauw
For the record. I have found a possible sollution: nn <- nodeapply(z) n.names= names(unlist(nn[[1]])) ext <- unlist(sapply(n.names, function(x) grep("split.varid.", x, value=T))) ext <- gsub("kids.split.varid.", "", ext) ext <- gsub("split.varid.", "", ext) dep.var <- as.character(terms(z)[1][[2]]

[R] Extract a predictors form constparty object (CHAID output) in R

2013-10-16 Thread Christiaan Pauw
I have a large dataset (questionnaire results) of mostly categorical variables. I have tested for dependency between the variables using chi-square test. There are an incomprehensible number of dependencies. I used the chaid() function in the CHAID package to detect interactions and separate out (w