Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CHAID analysis options for OS X / Python / R [closed]

I am looking for a good open source (or low cost) way to perform CHAID analysis. My favorite language is python, but R is ok too. OS X is a must.

I've found this package for R: http://r-forge.r-project.org/projects/chaid/ but can not find documentation on how to use it.

Anyone aware of good documentation of how to do CHAID analysis in an OS X environment? I'd like to avoid the SPSS / Answer Tree based solutions.

Thank you.

like image 757
Jake Lowen Avatar asked Jun 26 '13 01:06

Jake Lowen


1 Answers

The package is documented and the code is relatively simple. Here an exmple from the help of chaid:

library("CHAID")
 
### fit tree to subsample
set.seed(290875)
USvoteS <- USvote[sample(1:nrow(USvote), 1000),]
ctrl <- chaid_control(minsplit = 200, minprob = 0.1)
chaidUS <- chaid(vote3 ~ ., data = USvoteS, control = ctrl)
print(chaidUS)

enter image description here

PS Many married and well educated people who like BUSH And young single woman like GORE:)

like image 90
agstudy Avatar answered Nov 13 '22 19:11

agstudy