How to perform a Non linear regression

Reply
Contributor
Posts: 25

How to perform a Non linear regression

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

Respected Advisor
Posts: 4,644

Re: How to perform a Non linear regression

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
Respected Advisor
Posts: 2,655

Re: How to perform a Non linear regression

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

Contributor
Posts: 25

Re: How to perform a Non linear regression

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*Pi2.

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.

Respected Advisor
Posts: 2,655

Re: How to perform a Non linear regression

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

Contributor
Posts: 25

Re: How to perform a Non linear regression

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*Pi2.

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.

Respected Advisor
Posts: 4,644

Re: How to perform a Non linear regression

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
Ask a Question
Discussion stats
  • 6 replies
  • 257 views
  • 0 likes
  • 3 in conversation