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
- /
- Analytics
- /
- Stat Procs
- /
- PROC NLIN

Topic Options

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

Highlighted
# PROC NLIN

Options

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

Thursday

I am in need to calculate the initial and final NLLS of ai, bi, ci. With this I have the initial estimates of ai, bi, ci. I aware that the following equations would help to calculate the initial and final NLLS . However, I am struggling to write the SAS code through PROC NLIN. I would be much thankful, if anyone may help to write the SAS Code PROC NLIN.

Equation : yi = ai exp(-bi(x-ci)^2)

yi = 0.31, ai = 37, bi=3900.19, ci=0.314, x=0.291

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

Posted in reply to SONAIRAJAN

Thursday - last edited Thursday

The PROC NLILN documentation contains a Getting Started example as well as more compilcated examples. To use the procedure your data set should contain MULTIPLE pairs of the (x, y) data values. A typical usage is as follows:

```
proc nlin data=Have;
parms a=37 b=3900 c=0.3;
model y = a*exp(-b*(x-c)**2);
run;
```

However, I will point out that you can solve this problem by using PROC GENMOD (or even PROC REG). If you take the log of both sides, your model becomes

log(Y) = log(a) - b*(x-c)**2

which (if you reparametrize) is equivalent to a quadratic model for log(Y):

log(Y) = B0 + B1*x + B2*x**2

Which approach is better depends on an assumption about how the errors are distributed.