[R] Help in Compliling user -defined functions in Rpart

2005-08-26 Thread Luwis Tapiwa Diya
I have been trying to write my own user defined function in Rpart.I imitated the anova splitting rule which is given as an example.In the work I am doing ,I am calculating the concentration index(ci) ,which is in between -1 and +1.So my deviance is given by abs(ci)*(1-abs(ci)).Now when I run rpart

[R] Picking a subset of explanatory variables corresponding to a subset or a transformed subsert of the response

2005-07-18 Thread Luwis Tapiwa Diya
I have a dataframe in which I have used a cerain procedure to select the response a subset of the response and obtained a vector y.Now I need to fit a glm of the response y given x(the covariates) but now I get an error that the variables are not of equal length.How can I come up with a way to

[R] Accounting for clustered data in Rpart or Mvpart

2005-05-27 Thread Luwis Tapiwa Diya
I am working on data that is in clusters (eg events from persons in the family).So I have a clustered data set up and would like to build a tree(regression /classification tree) taking into account this clustered nature of the data. Do anybody know how to do this or maybe the code to take into