turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- How to perform a Non linear regression

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-05-2013 04:50 PM

Dear SAS Support Communities,

I have data collected from nematodes. The independent variable consists of six varying population densities, while the dependent variables include reproduction factor and the final population densities. However these dependent variables increase upto a certain point and then drop making a sigmoid type of a curve.

I however would like to determine the equation of the curve and also provide graphically this data. I have tried SAS Proc NLIN, but i have not been able to determine the the initial numbers for the equation in PARM. Could someone help with the procedure to do non linear regression in SAS?

Your support would be highly appreciated.

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-05-2013 10:19 PM

NLIN is for fitting the parameters of a known mathematical expression to data. What is the mathematical expression of the curves that you are trying to fit? - PG

PG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-06-2013 09:39 AM

Once you have the equation PG is referring to, you can get starting values by plugging in your observed values and back calculating what parameter values would give your observed values. Try this at a couple of points, and you will have a pretty good range to use in the PARMS statement.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2013 10:57 AM

see reply to PG. Also thanks to you for the support. Kindly see if you have further information to my questions below. Your support is highly appreciated.

Thanks alot PGStats,

I tried the suggestions you raised as well as SteveDenham. I realised that i have a quadratic regression equation. Here is what i obtained. Final population density=2846.05+7.507918*Pi-0.000688*Pi^{2.}

However, after looking at Parm section under Proc NLIN, i was not sure how to get the a and b, parameter values. My min Pi is 0 and max Pi is 10,000.

I have an additional question. Is there a known SAS procedure to test the type of regression a set of data posses? If so, whats the procedure?

Your support will be highly appreciated.

Regards.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-03-2013 08:34 AM

See 's response. A common misunderstanding about polynomial regression, which you have an example of, is that it needs nonlinear methods. Polynomial regression is linear in its components, as you can express it as a linear matrix multiplication problem. Nonlinear regression (at least as implemented in PROC NLIN) requires estimating the derivative of the function, either numerically or by formulae.

Good luck.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2013 10:55 AM

Thanks alot PGStats,

I tried the suggestions you raised as well as SteveDenham. I realised that i have a quadratic regression equation. Here is what i obtained. Final population density=2846.05+7.507918*Pi-0.000688*Pi^{2.}

However, after looking at Parm section under Proc NLIN, i was not sure how to get the a and b, parameter values. My min Pi is 0 and max Pi is 10,000.

I have an additional question. Is there a known SAS procedure to test the type of regression a set of data posses? If so, whats the procedure?

Your support will be highly appreciated.

Regards.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2013 10:07 PM

You don't need to provide initial estimates to fit this kind of polynomial. You can get a good fit and lots of diagnostics information from the robust regression procedure :

**proc robustreg data=myData plots=all;**

** effect Pi2 = POLY(Pi / degree=2);**

** model Pf = Pi2 / diagnostics leverage;**

**run;**

PG

PG