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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
kpberger
Obsidian | Level 7

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.

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
kpberger
Obsidian | Level 7

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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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