BookmarkSubscribeRSS Feed
tampham92
Obsidian | Level 7

Hi,

 

I have monthly data on X and Y since 2005 till now.

I would like to solve for the coefficient (b and a) of regressing y on x using the equation below. I came across a function called PROC NLMIXED in SAS but I am not quite sure that is a right function for me to use to solve for b and a in the following equation. Thanks a lot for your help!

 

image.png

 

 

 

X in the case is bounded between 0 and c

2 REPLIES 2
PGStats
Opal | Level 21

To fit a non-linear function Y = f(X) by regression to some X and Y data, you can use proc nlin. If the model linking Y to X involves random parameters, other than pure random error, you should use proc nlmixed.  

 

Start with proc nlin. It is fairly simple to use. The only tricky part is finding some good starting values for the parameters. Read the documentation.

 

https://documentation.sas.com/?docsetId=statug&docsetVersion=14.3&docsetTarget=statug_nlin_overview....

 

Don't hesitate to ask for more help if you encounter problems along the way.

PG
tampham92
Obsidian | Level 7

Would I be able to use the regular proc model to compute the coefficients to fit the data I have using defined equations.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 897 views
  • 0 likes
  • 2 in conversation