Proc Reg OUTPUT

  • Follow


Hi all,

For the following SAS statement, I am able to output the estimated
coefficients and corresponding test statistics to the external output
file, PD_OUT, without printing out the results on the output windows. But,
may I know how to get the results (F-statistics) of test statement (H0:
TEST DIFF_PRC=1) to the same output file?

Thank you!
Have a nice weekend!
Thomas


PROC REG DATA=PD_5MIN OUTEST=PD_OUT TABLEOUT NOPRINT;
 MODEL CLS_OFF=DIFF_PRC/ADJRSQ;
 BY DUM GROUP;
 H0: TEST DIFF_PRC=1;
RUN;
0
Reply tythong (120) 11/12/2004 3:54:44 PM

Hi Thomas,
may beif you use ODS OUTPOUT you would get the results.
Do like this:

ods output ParameterEstimates=Parameters_set;
   proc reg data=you_data;
      model dep = inpde_s;
   run;
quit;



-----Original Message-----
From: Thomas [mailto:tythong@YAHOO.COM]
Sent: November 12, 2004 10:55 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Proc Reg OUTPUT


Hi all,

For the following SAS statement, I am able to output the estimated
coefficients and corresponding test statistics to the external output
file, PD_OUT, without printing out the results on the output windows. But,
may I know how to get the results (F-statistics) of test statement (H0:
TEST DIFF_PRC=1) to the same output file?

Thank you!
Have a nice weekend!
Thomas


PROC REG DATA=PD_5MIN OUTEST=PD_OUT TABLEOUT NOPRINT;
 MODEL CLS_OFF=DIFF_PRC/ADJRSQ;
 BY DUM GROUP;
 H0: TEST DIFF_PRC=1;
RUN;
0
Reply Hamani.Elmaache1 (57) 11/12/2004 4:26:42 PM


> For the following SAS statement, I am able to output the estimated
> coefficients and corresponding test statistics to the external output
> file, PD_OUT, without printing out the results on the output windows. But,
> may I know how to get the results (F-statistics) of test statement (H0:
> TEST DIFF_PRC=1) to the same output file?
>

Thomas,

Rather than enter the OUTEST= option you may want to explore the Output
delivery system (ODS) to first determine what tables are produced with the
ODS TRACE statement and then how you might append or merge these tables
together, since variable names and types of output produced are different.

Robin High
Univ. of Oregon

.... here is a modified example of your PROC REG step:


ods trace on / listing;

ODS OUTPUT FitStatistics=fit;
ODS OUTPUT TestANOVA=tst;
ODS OUTPUT ParameterEstimates=prms;
*ODS LISTING OFF;

PROC REG DATA=PD ;*OUTEST=PD_OUT TABLEOUT NOPRINT;
 MODEL CLS_OFF=DIFF_PRC / ADJRSQ;
 BY DUM GROUP;
 H0: TEST DIFF_PRC=1;
RUN; quit;

ods trace off;
*ODS LISTING;

PROC PRINT DATA=fit; RUN;
PROC PRINT DATA=prms; RUN;
proc print data=tst; run;
0
Reply robinh (215) 11/12/2004 4:45:31 PM

Miguel,

If the two character variables are really numeric, but formatted as
character, you could simply proceed the proc with something like:

data want;
  set have;
  char1asnum=char1+0;
  char2asnum=char2+0;
run;

and then exchange char1 and char2 with char1asnum and char2asnum in your
proc reg statement.

Art
--------
On Tue, 28 Mar 2006 01:41:17 +0200, Miguel de la Hoz <miguel_hoz@YAHOO.ES>
wrote:

>Hi all,
>
>  I am trying to obtain a simple regression to my data. Some of the
variables are numeric, and others are character. Can you please guide me
to the right steps,
>  I am writing:
>
>  proc reg;
>  model y = numeric1 numeric2 char1 char2;
>  run;
>
>  But it is not working because char1 and char2 are character and I need
to tell the procedure the rigth way, can you please help me.
>
>  Many thanks in advance.
>
>  Miguel.
>
>
>---------------------------------
>
>LLama Gratis a cualquier PC del Mundo.
>Llamadas a fijos y m�viles desde 1 c�ntimo por minuto.
>http://es.voice.yahoo.com
0
Reply art297 (4237) 3/27/2006 11:57:19 PM

Ok,

  You are converting the character into numeric, but is it possible to tell the procedure to consider those 2 character variables in order the proc reg can build the dummy variables...

  Thanks,

  Miguel.

Arthur Tabachneck <art297@NETSCAPE.NET> escribi�:
  Miguel,

If the two character variables are really numeric, but formatted as
character, you could simply proceed the proc with something like:

data want;
set have;
char1asnum=char1+0;
char2asnum=char2+0;
run;

and then exchange char1 and char2 with char1asnum and char2asnum in your
proc reg statement.

Art
--------
On Tue, 28 Mar 2006 01:41:17 +0200, Miguel de la Hoz
wrote:

>Hi all,
>
> I am trying to obtain a simple regression to my data. Some of the
variables are numeric, and others are character. Can you please guide me
to the right steps,
> I am writing:
>
> proc reg;
> model y = numeric1 numeric2 char1 char2;
> run;
>
> But it is not working because char1 and char2 are character and I need
to tell the procedure the rigth way, can you please help me.
>
> Many thanks in advance.
>
> Miguel.
>
>
>---------------------------------
>
>LLama Gratis a cualquier PC del Mundo.
>Llamadas a fijos y m�viles desde 1 c�ntimo por minuto.
>http://es.voice.yahoo.com



---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y m�viles desde 1 c�ntimo por minuto.
http://es.voice.yahoo.com
0
Reply miguel_hoz (74) 3/28/2006 12:04:20 AM

4 Replies
33 Views

(page loaded in 0.196 seconds)


Reply: