Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
olithun
Level II

Calculating roots of a function

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

Re: Calculating roots of a function

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!

View solution in original post

2 REPLIES 2
Highlighted

Re: Calculating roots of a function

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!

View solution in original post

Highlighted
olithun
Level II

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.

 

 

Article Labels

    There are no labels assigned to this post.