BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
stan
Quartz | Level 8

Dear all,

 

my code is:

 

data example;
   input idn factor1 $ factor2 $ measurableDV;
   cards;
	2477 a1 b1 1.63
	2431 a1 b2 9.98
	2456 a1 b1 1.55
	2412 a1 b2 4.16
	2477 a2 b1 1.77
	2432 a2 b2 2.98
	2457 a2 b1 1.55
	2412 a2 b2 8.18
	2478 a3 b1 1.22
	2433 a3 b2 2.55
	2458 a3 b1 1.59
	2414 a3 b2 0.10
/* ... */
	;
	run;

proc print data = example; run;
ods select Position; proc contents order = VARNUM data = example; run; ods select default;


proc transreg data = example;
	model boxcox(measurableDV / LAMBDA = -3 to +3 BY 0.05 ALPHA = 0.001) = CLASS(factor1 factor2);
	output out = example_BoxCox;
	RUN;

proc print data = example_BoxCox; run;
ods select Position; proc contents order = VARNUM data = example_BoxCox; run; ods select default;

PROC CONTENTS shows that there is IDN variable in example data set.

But the variable is vanished in the example_BoxCox data set.

How to save it ?

 

1 ACCEPTED SOLUTION
2 REPLIES 2
ballardw
Super User

By default most of the regression procedures will only output variables used on the model statement and requested statistics/ parameters/ values. Many other procedures have similar behavior where only the "used" variables appear in result data sets.

 

If you need other variables to appear the output that were not used then the ID as @Reeza suggest

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 719 views
  • 2 likes
  • 3 in conversation