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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1184 views
  • 2 likes
  • 2 in conversation