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
- /
- definite integral in sas

- 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

03-01-2013 10:56 AM

Hi Everybody,

Could you help me to integrate this function using sas.

integrate x^2 e^(-x/2) between 0 to x and equate the result to 0.95 to find the value of x.

Thanks for your Co-operation.

Ram Adhikari

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

03-01-2013 11:13 AM

As far as I know, SAS does not evaluate integrals in general. It can perform numerical approximations to your integral, but I don't think there's a procedure or function in SAS to do that, you would have to write it yourself.

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

03-01-2013 11:20 AM

Is there a function to find the 95% confidence interval for Gamma Distribution ?

Ram

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

03-01-2013 11:27 AM

The GAMINV function will return quantiles from a Gamma Distribution; you would have to make use of the quantiles to create the confidence interval.

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

03-19-2014 10:33 AM

As Paige Miller says, you can use the QUANTILE function to find x such that P(t<=x)=0.95.

In general, you can use the QUAD routine in SAS/IML to solve integrals: How to numerically integrate a function in SAS - The DO Loop

It is also worth pointing out that you can evaluate integrals as part of a root-finding or optimization routine. For example, see