Hi all. Most of the observations in my large data set have non-missing values for both X and Y, but some are missing Y values. I am looking to predict values for Y using values from X. X may predict Y in a nonlinear fashion. While the end goal is to predict Y for those missing it, I would like to also predict Y for the whole population.
This is easy to do with a linear regression - just plug in the formula generated by regressing X on Y to those missing Y. However, how do I do this using some kind of nonlinear regression or splines? Thank you!
Hello. I actually ended up using proc glmselect to fit a model with splines per this blog post: https://blogs.sas.com/content/iml/2017/04/19/restricted-cubic-splines-sas.html
It outputs a data set that has the predicted values.
Are you using PROC NLIN?
If so, the OUTPUT statement gives you predicted values for any row in the data set which has all non-missing X variables, whether or not Y is missing.
Hello. I actually ended up using proc glmselect to fit a model with splines per this blog post: https://blogs.sas.com/content/iml/2017/04/19/restricted-cubic-splines-sas.html
It outputs a data set that has the predicted values.
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!
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.