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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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