Prev: proc sql+count
Next: proc sql+count
From: Dee Karmaoui on 6 Jan 2010 06:55 Could anyone help me with the following please: I have a macro with a number of equations that have multiple variables. The variables are located in a SAS dataset. I need to take each observation for each variable for the SAS dataset and run it through the programme to check it. I'm not sure how to write a macro that would recognise each observation for each variable. So for example, the equation macro has: %macro example(x, y, z, a, b); equation1 = (-50*&x/100) ; equation2 = 0.12 * equation1; equation3 =log(&x/100)**2; &b = (equation2 / (1-equation2))**0.5 * probit(0.999)) - &PD/100 * &y) * ((1 - 1.5 * equation3)**(-1)) * (1 + (&z - 2.5) * equation3); &b = &b / &equation1 * &a; %mend example; %example; the data set then has: N x y z a b 1 4 8 9 7 5 2 1 5 7 4 0 3 9 6 7 2 1 4 2 4 9 7 4 5 7 3 8 4 2 I'd like to run the %example but using every single value of x y z a b for each observation I'm sure it's really easy but I seem to have completely forgotten how to get there! I've been trying something along the lines of call symputx('site'||left (_n_),&var) Many thanks :)
|
Pages: 1 Prev: proc sql+count Next: proc sql+count |