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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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