dear all
i run regression separatey for each industry and each year in the panel data.
I have to save the values of actual, predicated and residuals.
the input file for the regression is as follows
COMPANY_NAME | YEAR | NIC_CODE | DV | IV_1 | IV_2 | IV_3 |
A D F Foods Ltd. | 2011 | 10 | 0.178526 | 0.000796 | 0.881805 | 0.080548 |
Agro Tech Foods Ltd. | 2011 | 10 | -0.14811 | 0.000349 | 2.496768 | 0.238252 |
Ajanta Soya Ltd. | 2011 | 10 | -0.16364 | 0.002064 | 6.225753 | 1.438506 |
Andrew Yule & Co. Ltd. | 2011 | 10 | 0.098988 | 0.000218 | 0.548305 | 0.125093 |
Arcuttipore Tea Co. Ltd. | 2011 | 10 | 0.009009 | 0.007508 | 0.21997 | -0.0045 |
Assam Company India Ltd. | 2011 | 10 | 0.021117 | 9.55E-05 | 0.211948 | -0.00285 |
Avanti Feeds Ltd. | 2011 | 10 | -0.06735 | 0.000849 | 1.762528 | 0.947087 |
B & A Ltd. | 2011 | 10 | 0.168481 | 0.001111 | 0.835851 | 0.079853 |
B C L Industries Ltd. | 2011 | 10 | -0.05169 | 0.000718 | 3.327997 | 1.185284 |
Bajaj Hindusthan Sugar Ltd. | 2011 | 10 | 0.142209 | 9E-06 | 0.443527 | 0.184995 |
A D F Foods Ltd. | 2012 | 10 | 0.04994 | 0.000631 | 0.708315 | 0.008839 |
Agro Tech Foods Ltd. | 2012 | 10 | 0.097351 | 0.000354 | 2.474027 | -0.05294 |
Ajanta Soya Ltd. | 2012 | 10 | 0.070818 | 0.001859 | 6.869703 | 1.261896 |
Andrew Yule & Co. Ltd. | 2012 | 10 | 0.067042 | 0.000214 | 0.622507 | 0.083985 |
Arcuttipore Tea Co. Ltd. | 2012 | 10 | -0.01475 | 0.007764 | 0.196429 | -0.03106 |
Assam Company India Ltd. | 2012 | 10 | 0.038277 | 8.29E-05 | 0.232606 | 0.048619 |
Avanti Feeds Ltd. | 2012 | 10 | 0.3481 | 0.000691 | 2.716517 | 1.282377 |
B & A Ltd. | 2012 | 10 | 0.135132 | 0.001022 | 0.839415 | 0.070122 |
B C L Industries Ltd. | 2012 | 10 | -0.04546 | 0.000559 | 2.902709 | 0.313544 |
Bajaj Hindusthan Sugar Ltd. | 2012 | 10 | -0.0457 | 9.77E-06 | 0.416821 | -0.06456 |
Associated Alcohols & Breweries Ltd. | 2011 | 11 | -0.02965 | 0.001052 | 0.954048 | 0.105889 |
Belapur Industries Ltd. | 2011 | 11 | 0.008021 | 0.013369 | 0.15508 | 0.001337 |
Bio Green Papers Ltd. | 2011 | 11 | 0.097404 | 0.002219 | 0.193033 | -0.04038 |
Chaman Lal Setia Exports Ltd. | 2011 | 11 | 0.070517 | 0.001181 | 1.984408 | -0.20872 |
Elegant Floriculture & Agrotech (India) Ltd. | 2011 | 11 | -0.27549 | 0.006068 | 0.040049 | 0.004854 |
Empee Distilleries Ltd. | 2011 | 11 | 0.11797 | 0.000246 | 0.690689 | 0.029437 |
Flex Foods Ltd. | 2011 | 11 | 0.127556 | 0.001319 | 0.605065 | 0.111727 |
G M Breweries Ltd. | 2011 | 11 | 0.290524 | 0.000868 | 2.006855 | 0.103523 |
Associated Alcohols & Breweries Ltd. | 2012 | 11 | 0.204466 | 0.000893 | 1.236177 | 0.425726 |
Belapur Industries Ltd. | 2012 | 11 | -0.01664 | 0.01387 | 0.178918 | 0.018031 |
Chaman Lal Setia Exports Ltd. | 2012 | 11 | -0.01903 | 0.001012 | 2.201599 | 0.501366 |
Elegant Floriculture & Agrotech (India) Ltd. | 2012 | 11 | -0.01341 | 0.004789 | 0.03113 | -0.00048 |
Empee Distilleries Ltd. | 2012 | 11 | 0.188802 | 0.000201 | 0.935492 | 0.371738 |
Flex Foods Ltd. | 2012 | 11 | 0.103462 | 0.001342 | 0.674852 | 0.059313 |
G M Breweries Ltd. | 2012 | 11 | 0.127283 | 0.000674 | 1.687218 | 0.1289 |
G R Cables Ltd. | 2012 | 11 | -0.00445 | 0.007413 | 0.006672 | 0.002965 |
Gangotri Textiles Ltd. | 2012 | 11 | 0.028039 | 0.000203 | 0.324616 | -0.09635 |
Gujarat Ambuja Exports Ltd. | 2012 | 11 | -0.00414 | 0.0001 | 2.123077 | 0.172181 |
Himalaya Food Intl. Ltd. | 2012 | 11 | 0.106164 | 0.00039 | 0.421771 | 0.100706 |
i run the following regression code in SAS
proc reg data=have;
model DV=IV_1 IV_2 IV_3;
by NIC_Code year;
run;
i want to save the required variables from the output in the following format
COMPANY_NAME | YEAR | NIC_CODE | Actual | Predicted | Residual |
A D F Foods Ltd. | 2011 | | | | |
Agro Tech Foods Ltd. | 2011 | | | | |
Ajanta Soya Ltd. | 2011 | | | | |
Andrew Yule & Co. Ltd. | 2011 | | | | |
Arcuttipore Tea Co. Ltd. | 2011 | | | | |
Assam Company India Ltd. | 2011 | | | | |
Avanti Feeds Ltd. | 2011 | | | | |
B & A Ltd. | 2011 | | | | |
B C L Industries Ltd. | 2011 | | | | |
Bajaj Hindusthan Sugar Ltd. | 2011 | | | | |
A D F Foods Ltd. | 2012 | | | | |
Agro Tech Foods Ltd. | 2012 | | | | |
Ajanta Soya Ltd. | 2012 | | | | |
Andrew Yule & Co. Ltd. | 2012 | | | | |
Arcuttipore Tea Co. Ltd. | 2012 | | | | |
Assam Company India Ltd. | 2012 | | | | |
Avanti Feeds Ltd. | 2012 | | | | |
B & A Ltd. | 2012 | | | | |
B C L Industries Ltd. | 2012 | | | | |
Bajaj Hindusthan Sugar Ltd. | 2012 | | | | |
Associated Alcohols & Breweries Ltd. | 2011 | | | | |
Belapur Industries Ltd. | 2011 | | | | |
Bio Green Papers Ltd. | 2011 | | | | |
Chaman Lal Setia Exports Ltd. | 2011 | | | | |
Elegant Floriculture & Agrotech (India) Ltd. | 2011 | | | | |
Empee Distilleries Ltd. | 2011 | | | | |
Flex Foods Ltd. | 2011 | | | | |
G M Breweries Ltd. | 2011 | | | | |
Associated Alcohols & Breweries Ltd. | 2012 | | | | |
Belapur Industries Ltd. | 2012 | | | | |
Chaman Lal Setia Exports Ltd. | 2012 | | | | |
Elegant Floriculture & Agrotech (India) Ltd. | 2012 | | | | |
Empee Distilleries Ltd. | 2012 | | | | |
Flex Foods Ltd. | 2012 | | | | |
G M Breweries Ltd. | 2012 | | | | |
G R Cables Ltd. | 2012 | | | | |
Gangotri Textiles Ltd. | 2012 | | | | |
Gujarat Ambuja Exports Ltd. | 2012 | | | | |
Himalaya Food Intl. Ltd. | 2012 | | | | |
please help in writing the SAS code which can generate a separate file the the required variables in the above mentioned format.
thanks in advance