Hi all,

 

I am facing a problem with fine-classing used in logistic regression. If the
term is not clear, here are the details of what I want to do:

 

Suppose I have 40000 entries in total and I want to have 10 groups of these,
so ideally the group length should be of 4000 each, but according to the
fine classing logic,

if values between sequence number say 3999 and 4999 are equal in magnitude,
then it clubs them all together and makes the first group of length 4999
instead of 4000. 

 

Then from second group onwards according to my need it should not make
groups of length (40000-4999)/9, instead it should check up to a length of
4000 for the second one also 

and if it again finds same numbers in entry numbers say 3500-5500 it should
make the second group of length 5500 instead of 4000 and similarly for the
rest groups. 

In this process if at the end we are left with lesser groups say only 6 or 7
then it should not give any error and should proceed with the lesser number
of groups.

Also, I want to label these groups as per my wish , say for example if there
are 7 groups, labelling is 1-7 or a-g.

 

I have tried the functions cut and quantcut, but both seem to have a
slightly different logic than what I want to do.

 

Please see if somebody can suggest some function or package related to this.

 

Thanks

 


	[[alternative HTML version deleted]]

