Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODS cutting off var names in regression output

Status
Not open for further replies.

Sastronaut

Programmer
Dec 23, 2007
26
0
0
US
I'm using ODS to output parameter estimates from proc logistic to an output data set. ODS is truncating my variable names to 20 characters. Anyone know a work-around for this? proc template perhaps?

Code:
data x;
DO I=1 TO 1000;
THIS_VAR_IS_EXACTLY_28_CHARS = RANUNI(1);
DEPVAR = (RANUNI(2) < .25);
OUTPUT;
END;
RUN;

ODS OUTPUT  Logistic.ParameterEstimates = BETAS;
PROC LOGISTIC DATA=X DESCENDING;
MODEL DEPVAR = THIS_VAR_IS_EXACTLY_28_CHARS;
RUN;

PROC PRINT DATA=BETAS;
RUN;

You can see that the variable name is cutoff in line 2 of the output data:

Code:
                                                                             Prob
Obs    Variable                DF    Estimate      StdErr     WaldChiSq     ChiSq

 1     Intercept                1     -1.0462      0.1437       53.0183    <.0001
 2     THIS_VAR_IS_EXACTLY_     1     -0.0200      0.2454        0.0067    0.9349
 
Hi
whenever I use logistic/reg/genmod etc.. they always reduce the length of the parameter estimates to 16.

So to use the parameter estimate in different data set i either reduce the length of the variable to 16 before hand or use

if substr(THIS_VAR_IS_EXACTLY_28_CHARS,1,16)='THIS_VAR_IS_EXACTLY_' then pest = -0.0200;

cheers
 
the namelen = 32 option in the proc statement does the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top