I've been try (and struggling) to translate some SAS code to STATA. Unfortunately I don't see any guide on the web and I've not so much knowledge about SAS.
I'm wondering whether you can help me with this line of code to translate in STATA
In SAS I have the following statement
Code:
CASE WHEN varx = 1 or (varx = qtr(date)) THEN vary ELSE vary - lag.vary END as CAPEX
Code:
gen CAPEX=. replace CAPEX=vary if varx=1 | varx=qtr(date) ELSE replace CAPEX=vary- l.vary
Do you have any help on that? Many thanks
0 Response to Else operator - from SAS to STATA
Post a Comment