Turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- Calculating roots of a function

- 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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jan 3, 2020 7:02 AM
(370 views)

Hi everyone,

How do I calculate the roots of a function in JSL for confidence intervals?

I have a special case, where I need to calculate confidence Intervals which aren't implemented in JMP.

Using the Wilks theorem, I want to calculate confidence intervalls by calculating the roots of the following function:

f(x)=-2log(Likelihood(x|Data))-ChiSquare Quantile( 1-alpha, 1).

Where x is a real number and the Data is a univariate sample

Is there any build in JSL function I can use? Or at least something similar?

I couldn`t find anything on the web or in the scripting index.

I would really appreciate some suggestions.

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

See **Help** about the **Minimize()** function. Your expression is Abs( -2log(Likelihood(x|Data))-ChiSquare Quantile( 1-alpha, 1) ). This numerical optimization should be able to solve for the roots. The easiest way would be to use a Script Editor. Select **File > New > Script**. Right-click and select **Show Embedded Log**. This way the result of the function call will be shown in the same window.

Learn it once, use it forever!

2 REPLIES 2

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

See **Help** about the **Minimize()** function. Your expression is Abs( -2log(Likelihood(x|Data))-ChiSquare Quantile( 1-alpha, 1) ). This numerical optimization should be able to solve for the roots. The easiest way would be to use a Script Editor. Select **File > New > Script**. Right-click and select **Show Embedded Log**. This way the result of the function call will be shown in the same window.

Learn it once, use it forever!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating roots of a function

Thanks for the answer,

the Minimize function seems to be seems to be a little unstable in extreme situations.

However, your tip gave me a good starting point to come up with a solution.