- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
@Kurt_Bremser and @art297 helped me with some code to define a dummy variable which was 1 if a company's annual return had increased from the previous year and 0 otherwise.
I want to interact this term with annual_return in my model so that I can test the hypothesis that executives will be rewarded when the company does well but to be insulated from downturns in performance (if the compensation contract is constructed to encourage risk-taking behavior).
Running what I thought to be the appropriate model, however, I ran into two error messages, which I don't understand. Here is the log:
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
PROC REG does not allow interactions via the X1*X2 syntax.
Use PROC GLM instead. (And in PROC GLM, you don't need to create a column of dummy variables, you can use the CLASS statement instead).
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
PROC REG does not allow interactions via the X1*X2 syntax.
Use PROC GLM instead. (And in PROC GLM, you don't need to create a column of dummy variables, you can use the CLASS statement instead).
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
is there more to do than just substituting reg with glm?
here's my new log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The error message says that INCREASE is not a variable in data set paper.ceo_firm.
So you can't use INCREASE until you create it in paper.ceo_firm
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Ah, I didn't realize I had to re-run the datastep after logging back into SAS. The other error messages are still present, however.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Show us the SASLOG so we can see these other error messages after you fixed the first error.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here you are:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
there is no CLB or ACOV option in PROC GLM.
From now on, please paste code and SASLOGs by first clicking on the "running Man" or "Insert SAS Code" icon. This will preserve spacing and make the code and SASLOGs much easier to read.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Note taken. Thanks so much for the help!