RobinHankin / hyper2

https://robinhankin.github.io/hyper2/
5 stars 3 forks source link

profile likelihood #38

Closed RobinHankin closed 4 years ago

RobinHankin commented 4 years ago

In the vignette hyper2.Rnw I use profile likelihood techniques to give a support interval for Laura's strength. I also present a profile likelilhood curve in table_tennis_serve.Rmd and home_advantage.Rmd. But note that the numerical method used for table tennis is very inefficient compared to that used in home advantage.

It would be good to have a function, profile_likelihood(H,i,p) implemented which takes a hyper2 object, an integer (corresponding to the component to be profiled) and p, the probability to condition upon, which returns a likelihood for p_i=p.

RobinHankin commented 4 years ago

I fear that function profile_likelihood() in vignettes/table_tennis_serve.Rmd is a poor methodology which will stress the numerics because the allowable part of parameter space is only a very thin region, sandwiched between two very close parallel hyperplanes. Function specificp.ne.test() uses a sensible methodology, carrying out two constrained maximizations, one p_S <= S and one p_S >= S, and choosing the constraint which gives lower lower likelihood of the two as the appropriate constraint, and reporting this likelihood.