02-20-2013 02:33 PM
I'm running a multiple regression by group; basically, I have a long list of stock trade data for various companies organized by ticker symbol and a regression is being run by symbol. The result is a set of parameter estimates for each company. When it's time to copy these parameter estimates into excel, it takes me ages because each set of parameter estimates is in a table on its own and i have to manually copy + paste the contents one by one. Is there anyway to have all parameter estimates appear in one table by ticker symbol? Something like this:
|Ticker Symbol||(Parameter estimate A)||(Parameter estimate B)|
Since a lot of the parameter estimates have several zeros after the decimal (for example: 0.0000002331), I need to make sure the table provides enough decimal places for the estimates (in other words, I don't want it to be reported as "0.00").
Any help is greatly appreciated. As a SAS beginner, I must say I have learnt a great deal from these boards. Thanks in advance.
02-20-2013 02:48 PM
Would you get what you need by using the outtest option (see: SAS/STAT(R) 9.2 User's Guide, Second Edition )? Otherwise, you should be able to get them from the ODS tables.
02-20-2013 04:09 PM
Thanks Arthur. I was able to get the table I needed; however, the table still rounds values. For example 2.767E-08 is coming up as 0.000000028. I don't know how to keep them in their original scientific format.
02-20-2013 04:49 PM
In the original output, where the parameter estimates are reported by symbol in individual tables, there is no rounding. When I create that new table they get rounded. I wonder if there is a way I can specify no rounding in the outest function.
02-20-2013 04:53 PM
I don't think you're talking about 'rounding', I think you're talking about the format applied to the data.
I don't know of a way to change the format in the output step. I'd change it in a second step or where I was going to use or manipulate the format.
02-20-2013 04:56 PM
I think it is being rounded because when I run the proc reg step without the outest option the parameter estimate for the first symbol comes up as 2.767E-08 in the output. When I throw in the outest, the new table that contains all the symbols and their parameters is showing 0.000000028 for that same parameter estimate.
02-20-2013 05:01 PM
What happens when you do the following. Replace the have with the dataset you created from outest and the parameters with the names of your variables that you think are 'rounded'.
format parameters e10.;
02-20-2013 05:30 PM
Hmm, it didn't change anything.
This is the original table i get after running proc reg:
|Parameter Estimates AMD|
|Variable||DF||Parameter Estimate||Standard Error||t Value||Pr > |t||
This is the first row of the table i get from the OUTEST (ive underlined the parameter estimates that correspond to the table above):
As you can see, it's still rounding. Did I apply your code properly? The codes that I used are:
PROC REG data=GH2 outest=est;
model Pchange = signchange LAGQV sign QV / noint;
format parameters e10.;
proc print data = FINAL;
02-20-2013 05:37 PM
|Obs||symbol||_MODEL_||_TYPE_||_DEPVAR_||_RMSE_||signchange||LAGQV||sign||QV||PchangeWith the parameters corrected... still rounded but in scientific format.|
02-20-2013 05:35 PM
Woops I left out the parameters that time, but I just ran it again with the parameters and it does brings up the exact same rounded values, but instead of bringing them in number format it brings them up (still rounded) in scientific format.
Need further help from the community? Please ask a new question.