Programming the statistical procedures from SAS

Values from table to variable

Reply
Occasional Contributor
Posts: 6

Values from table to variable

[ Edited ]

Hi,

 

Could someone please tell me how to assign a set of variables, values from a table. I have a table of parameter estimates of a non linear regression and I want to pass the values of the estimates to the variables for a differetn set of calculation.

 

Debjit

Grand Advisor
Posts: 16,933

Re: Values from table to variable

I'm not sure what you're asking, can you please clarify your question.

Occasional Contributor
Posts: 6

Re: Values from table to variable

[ Edited ]

I have a table of parameter estimates of variables. Lets call the variables a, b,c & d. I wish to know if there is a way to save the values of the parameter estimates of a, b, c, d in a set of different variables a1,b1,c1 & d1. I think my question is how to pass the values from a table to some other variables.

 

 

Super Contributor
Posts: 251

Re: Values from table to variable

There may be elegant way for this. But a hardway is to use ods output and proc transpose as:

 

proc reg data = sashelp.class;
model weight = height age ;
ods output ParameterEstimates = param(keep = Estimate);
run;

proc transpose data = param out = see(keep =ColSmiley Happy;
run;

proc print data = see;
run;

 

 

SAS Super FREQ
Posts: 3,319

Re: Values from table to variable

[ Edited ]

If you post your code, it will easier to know what you are trying to do. 

 

One interpretation: You are running a regression and you get a parameter estimates table. You can write the table to a SAS data set by submitting the statement:

ods output ParameterEstimate; /* or whatever the table name is */

You can find the name of any ODS table produced by any SAS procedure.

After you have a SAS data set, you can use PROC TRANSPOSE and the RENAME statement in a DATA step to rename the variables.

 

Grand Advisor
Posts: 10,075

Re: Values from table to variable

By table do you mean a SAS dataset? A table in a non-SAS data base or other electronic file? A table of values generated by somether software in a report? A printed document?

 

 

Ask a Question
Discussion stats
  • 5 replies
  • 256 views
  • 0 likes
  • 5 in conversation