p****u 发帖数: 1940 | 1 PROC REG OUTest = c6_beta_std data=c5_readyToEstimate;
MODEL ret = vwretd / NOPRINT;
by key2;
RUN ;
--------------------------
PROC REG OUTest = c6_beta_std data=c5_readyToEstimate;
ID key2;
MODEL ret = vwretd / NOPRINT;
output out = c7_beta_std stdR = stdr;
by key2;
RUN ;
--------------------------
请教,我想输出residual standard deviation 和 系数 estimation。我想regression
by key2。最好能够输出到一个数据文件。第一个程序输出系数是在key2 group level
上估计的没问题。
但是第二个程序,输出是分开的(不喜欢)。而且用ID key2在c7_beta_std里面没有给
我想要的数据。这个程序现在的输出是每个数据点,而不是by... 阅读全帖 |
|
i******r 发帖数: 323 | 2 1。我用proc reg, ridge, 有一些c value, c=0 to 0.1 by 0.05, 我要在output里有
VIF 和r2,这样我可以判断哪个c最好。我用了
proc reg data=a outest=b outvif rsquare ridge=0 to 0.1 by 0.05;
但是,我的output里只有c=0 的rsqare, 后面就成了missing value.我不知道这对不对
,还有我用的是sas 9.1.
2。也是sas题, observations on Y are to be taken when x=10,20,30,40,50,
respectively. The true regression function is E{Y}=20+10x. The error terms
are independent and normally distributed, with E{error}=0 and variance=0.8x.
How to generate random Y observations for each X level i |
|
q**j 发帖数: 10612 | 3 proc reg datat = yourdata outest = out;
by whatever;
model whatever;
run;
you can play with the "out" data set later.
万多
个m
把结
等等 |
|
h**********i 发帖数: 580 | 4 谢谢。可能是我没有讲清楚,selection=f的话可以在输出窗口看到step1和step2分别
有哪些变量,但是我要同时做若干个这样的回归,不可能一个一个地在输出窗口看
step1和step2是什么变量,而是希望有一种方法,可以在数据集中查看。
我试过outest=work,结果得到的work中包含了X1-X10的所有回归系数,而不是只有
step2的 |
|
a*****r 发帖数: 681 | 5 proc forecast data=AAA interval=month lead=18 method=winters
seasons=12 out=BBB outfull
outest=est outfitstats;
by org dst;
id yymm;
var ccc;
run; |
|
o****o 发帖数: 8077 | 6 我怎么觉得LZ就是那个意思呢
proc sql;
create table x2 as
select a.*, b.year as id
from x as a, x as b
where a.year-b.year<=7 & a.year-b.year>=0 & b.year<=(2002-6)
;
quit;
ods select none;
proc reg data=x2 outest=beta;
by id;
model ln_gdp = year;
run;quit;
ods select all; |
|
l**********9 发帖数: 148 | 7 高手的代码果然简练,佩服佩服...
不过我记得sgplot中的reg不能输出estimate parameter,想要检验斜率只能用肉眼了.
...如果想输出的话,还是得用proc reg吧...
proc sort data=one;
by Agegrp;
run;
proc reg data=one outest=temp;
by Agegrp;
model cancer = year_dx ;
run;
data slope(drop=_MODEL_ _TYPE_ _DEPVAR_ _RMSE_ Intercept cancer);
set temp(rename=(year_dx=slope));
run;
这样能显示斜率...但是代码好长不美观>_< |
|
|
on 发帖数: 199 | 9 you can add an option like the following:
proc reg data=homework OUTEST=PARAMETERS;
now you save the parameters in the dataset PARAMETERS; then you can do proc
means or whatever. |
|
p*******r 发帖数: 1951 | 10 除了outest=est 外再加上 tableout option就有 p-value了。对应为output dataset
中 _type_ 变量为 PVALUE 的。 |
|
o****o 发帖数: 8077 | 11 two approaches using PROC REG
1. ODS OUTPUT INVXPX=INVERSED;
PROC REG DATA=URDATA NOPRINT SINGULAR=1E-17;
MODEL Y = X1-X10 /I NOINT;
RUN;QUIT;
2. PROC REG DATA=URDATA2 NOPRINT OUTEST=INVERSED SINGULAR=1E-17;
MODEL I1-I10 = X1-X10 /NOINT;
RUN;QUIT;
check here:
http://www.sas-programming.com/2011/10/obtain-trace-of-projecti
baozi pls |
|
a***d 发帖数: 336 | 12 glmselect does not seem to have an option like outest..
do I have to manually copy the coefficients from the ODS outputs?
Thanks a lot! |
|
a***d 发帖数: 336 | 13 found that glmselect generates a macro variable with selected effects called
_glsind. I than run a proc reg using the selected effects and save it using
outest. Very awkward but works. |
|
o********a 发帖数: 242 | 14 using outest=filename will only give me regression coefficients, how can I
output other statistics such as standard errors, CIs (for the whole model,
not each observation like output statement produces)?
Thanks! |
|