hello teacher
I have a question need help, I want to simulate the SAS code to separate "size" to two groups per year (yymm is time variable)
///////(SAS code)///////
PROC RANK DATA=stock GROUPS=2 OUT=rout1;
VAR size;
RANKS sr;
BY yymm;
RUN;
////////////////////////////////////
My Stata code
bys yymm: xtile sr=size,np(2)
Stata reply: (xtile may not be combined with by )
so I change code
xtile sr=size,nq(2) by(yymm)
Stata reply: (option by() not allowed )
so.. what can I do? , please help
Related Posts with rank problem
plot the results of a 2sls regression with fixed effectsHello, I want to plot the results of a 2sls regression with fixed effects for different values of a …
Contract year reshapeDear Statalists, Hope all is well. I am dealing with the contract data with specific contract star…
Bayesian analysis in StataI will be leading a workshop on Bayesian analysis, where I need to make all Baysian analyses as simp…
Removing duplicatesHi, I have a dataset which i want to be uniques with the variables gvkey, fyear and loc. But there …
Dates got omitted due to collinearity in fixed-effects regression modelHello, I run a regression to examine what has an impact on the decision to sell a stock on the stoc…
Subscribe to:
Post Comments (Atom)
0 Response to rank problem
Post a Comment