code is working as it says there is no errors however it capsize_micro is showing a parameter estimate of 0
I am trying to compare return to market cap size - mega, large, mid, small, and micro
proc import datafile="/home/u63997444/ECON 348/Master use good 4.csv"
out=work.finaluse
dbms=csv
replace;
run;
data capsizedd;
set finaluse;
/* Assigning capsize based on Firm */
if 1 <= Firm <= 10 then capsize = "mega";
else if 11 <= Firm <= 20 then capsize = "larg";
else if 21 <= Firm <= 30 then capsize = "mid";
else if 31 <= Firm <= 40 then capsize = "smal";
else if 41 <= Firm <= 50 then capsize = "micr";
else capsize = "unknown"; /* Default case for capsize if Firm is not in expected range */
/* Convert capsize into numeric dummy variables for regression */
if capsize = "mega" then capsize_mega = 1; else capsize_mega = 0;
if capsize = "larg" then capsize_large = 1; else capsize_large = 0;
if capsize = "mid" then capsize_mid = 1; else capsize_mid = 0;
if capsize = "smal" then capsize_small = 1; else capsize_small = 0;
if capsize = "micr" then capsize_micro = 1; else capsize_micro = 0;
run;
proc reg data=capsizedd;
model return=capsize_mega capsize_large capsize_mid capsize_small capsize_micro;
run;
Show us what you are looking at that makes you say it isn't right. Explain what you expect to see that would be "right".
Next, no need to compute dummy 0/1 variables like you did, you can perform this regression in PROC GLM without creating dummy 0/1 variables.
proc glm data=capsizedd;
class capsize;
model return=capsize/solution;
run;
It's because capsize micro is showing a paramter estimate of 0 which doesn't make sense given other cap sizes have parameter estimates
That's how the math works and that's how SAS works, one of the categories will get an estimate of zero. And there's nothing wrong with this answer. I wrote an example to show why this is one way of handling this situation.
From now on, @acleamon please give more explanation in your first post, do not assume we know what you know.
When I was learning SAS I was encouraged, no threatened, that if I hadn't read the SAS Log no-one would believe that my program had failed!! The reason is that the SAS Log often has THE answers to your questions about why your SAS program has died/crashed/failed, and I should read the SAS Log first to avoid being laughed it.
My experience, so don't make it yours too. Give us a look at your SAS Log!!
..........Phil
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.