I have a file with about 20,000 observations, but the variable A is blank in the vast majority of observations. All other variables have values for every observation.
The first observation provides a value for the variable A. I want to assign all successive observations with blank values the...
Well, that does it for me, but I want put the results back into the data step.
GOAL:
Var A is 613 unique observations.
Var B is a the rank of the Var A
Var C = 490th highest value of Var A
Var D = If Var B<=410th highest value of Var A Then (C-A) Else 0;
Var A is dependent on previously...
Thank you, Klaz! It works!
Also, I did not know that I could use proc sql to make a macro variable.
http://www.cognigencorp.com/perspective/tipsNtricks.pub/1/PROC%20SQL%20Talk_12_.ppt
proc sql;
select mean(rhin_age)
into: meanage
from orcl.pat_survey1
where...
I have a variable A and variable B and each has 613 observations. Variable C = A/B.
I want to create variable D within the data step that divides sum total of variable A by sum total of variable B. Yes, variable D will be same value for all 613 observations. I cannot use a macro as a constant...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.