Hello,
I have following code running in SAS,
proc adaptivereg data=imported_excel
SEED = 123
PLOTS = ALL
details=bases;
partition fraction(validate=0.25 test=0.25);
model Y = A B C;
RUN;
is there anyway I can output the partition dataset, test,validate, respectively? Thanks.
Ok...I tried to run it to check, but it keeps crashing in SAS Studio.
If you generate an OUTPUT data set, does it contain a _ROLE_ variable that denotes what each observation was categorized?
You can generate the OUTPUT data set using something like
output out=dataset_role;
If you have partitioned the input data by using a PARTITION statement, then a character variable _ROLE_ is included in the output data set. For each observation the value of _ROLE_ is as follows:
_ROLE_ Observation
TEST Testing
TRAIN Training
VALIDATE Validation
Reeza,
Thanks for your reply.
I did your suggestion, but no data set was generated. Where should I insert "output out=dataset_role" to my model? Thanks.
proc adaptivereg data=imported_excel
SEED = 123
PLOTS = ALL
details=bases;
partition fraction(validate=0.25 test=0.25);
model Y = A B C;
output out=dataset_role;
RUN;
If this doesn't work post your log. I ran it using the example in the documentation and it worked fine.
Reeza,
Thanks for your reply. It does work, but I still got one question. So I am using 25% of the whole dataset as "test", the number of observations in my whole data set is 816, literally I should get 204 "test" observations. However, I found there were 211 observations pulled out as "test" with the code above, is there anything wrong with this? Not a big deal, just curious, thanks!
No idea, I would consider passing that on to Tech Support.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.