Hello eveyrone,
I was trying to implement this code. unforutnately, sas does not recognize my intnx. what shoud i do?
Best wishes,
Sincerely Daniel.
ROC SQL;
CREATE TABLE crsp_m2
AS SELECT A.*, B.dlret,
sum(1,ret)*sum(1,dlret)-1 as retadj "adjusted return for delisting",
abs(a.prc*a.shrout) as MEq 'Market Value of Equity'
FROM CRSP_M AS A LEFT JOIN tmp1.msedelist (where=(missing(dlret)=0 ) ) AS b
ON a.permno=b.permno AND
intnx('month',a.date,0,'E')=intnx('month',b.DLSTDT,0,'E')
ORDER BY date, permco, MEq;
QUIT;
Post your log or explain how it doesn't work please.
I think your error is In how you want to name the variable with spaces. If you want spaces in a variable name the you wrap it in quotes and add an N afterwards. You're missing the N from both variable names.
Post your log or explain how it doesn't work please.
I think your error is In how you want to name the variable with spaces. If you want spaces in a variable name the you wrap it in quotes and add an N afterwards. You're missing the N from both variable names.
Have you confirmed that your date variables are actually dates, and not date-times? Date-time values would likely be too large for INTNX to handle.
The ABS() function works fine, but you have missing values for one of the variables in the function and the log is warning you that in this case you will get a missing value returned.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.