you know what--it looks like this was linked to the case of the merge statement having more than one data set with repeats of BY values. Since implementing the code that you and @Tom came up with, SAS read 12,650 observations, and SAS used 12,650 observations. Perfect!
So the issue must have been the regression not including data from either but not both sources and labelled them as "missing," meaning they didn't match with the other data?
I'm not going to go through your code, and I don't have your data set, but the problem is that a missing value in the X variable or a missing value in the Y variable will cause SAS to NOT use that record.
The very simple step that you need to take is to open the data set paper.ceo_firm into SAS ViewTable (or other viewer) and actually look at the data being sent into PROC REG and see if there are missings. Or use the NMISS function to count the number of missings in each record (among the X and Y variables used in the regression)
This issue has already been resolved. Thanks though.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.