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

I'm using Proc Mixed to build a model (see code below) and I would like to split the data into training and validation so I can see how well the model works on predicting data it has not seen.  I found that proc glm allows data to be split into different fractions, but I wonder how to use both sets of code?  Does proc glm select just split the data and then I run proc mixed on the different fractions separately?   Thanks for the help.

proc mixed data=ttnc_subsetsort PLOTS=RESIDUALPANEL(UNPACK) RATIO;
  class hyb ntrt pd loc pass rep;
  model tncV12log =hyb ntrt pd ntrt*hyb pd*hyb ntrt*pd / residual;
  random loc rep(loc) loc*ntrt loc*hyb ;
  lsmeans hyb ntrt pd hyb*ntrt / pdiff=all cl adjust=tukey;
  title1 'Fit TNC V12 Model with Factors';
  run;
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

This will give you a great start on doing resampling (from @Rick_SAS )

https://blogs.sas.com/content/iml/tag/bootstrap-and-resampling

 

and señor @Ksharp wrote this which is for Logistic regression but ought to work for PROC MIXED as well with minor modifications.

https://communities.sas.com/t5/SAS-Programming/10-FOLD-CROSS-VALIDATION-amp-BOOTSTRAPPING/m-p/448485...

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

This will give you a great start on doing resampling (from @Rick_SAS )

https://blogs.sas.com/content/iml/tag/bootstrap-and-resampling

 

and señor @Ksharp wrote this which is for Logistic regression but ought to work for PROC MIXED as well with minor modifications.

https://communities.sas.com/t5/SAS-Programming/10-FOLD-CROSS-VALIDATION-amp-BOOTSTRAPPING/m-p/448485...

--
Paige Miller
Daisy2
Obsidian | Level 7
THanks. I'll have to dig into these -I'm a new SAS user so not familiar with macros.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 737 views
  • 2 likes
  • 2 in conversation