Create series for multinomial logit
Posted: Sat Jan 31, 2009 4:33 am
Hi,
I am trying to create an ordered series so I can perform multinomial logit regressions.
I am looking to create this;
y=0 if x<=0
y=1 if 0<x<=2.5
y=2 if 2.5<x<=7.5
etc...
So far I have used the below method without success.
series xordered=((x<=0,x,0) and (x>0 and x<=2.5,x,1) and (x>2.5 and x<=7.5,x,2) and (x>7.5 and x<=15,x,3) and (x>15 and x<=30,x,4) and (x>30,x,5))
Any advice would be greatly appreciated!
Thanks!
I am trying to create an ordered series so I can perform multinomial logit regressions.
I am looking to create this;
y=0 if x<=0
y=1 if 0<x<=2.5
y=2 if 2.5<x<=7.5
etc...
So far I have used the below method without success.
series xordered=((x<=0,x,0) and (x>0 and x<=2.5,x,1) and (x>2.5 and x<=7.5,x,2) and (x>7.5 and x<=15,x,3) and (x>15 and x<=30,x,4) and (x>30,x,5))
Any advice would be greatly appreciated!
Thanks!