|
d_labes ★★★ Berlin, Germany, 2012-12-05 13:13 (4939 d 14:10 ago) Posting: # 9672 Views: 11,644 |
|
|
Dear All! Sometimes it may be desirable to calculate the confidence interval for a coefficient of variation. See this thread. PowerTOST therefore contains a function CVCL() to do this. Helmut, in a personal communication, pointed out a peculiarity of the confidence intervals if one uses some rather unusual values for alpha, the probability of error:R-code (new defined CVCL() in an upcoming version of PowerTOST): CVCL <- function(CV, df, side=c("upper", "lower", "2-sided"), alpha=0.05)Have a look at the output (lower limit of course always zero for a upper one-sided CI): alpha lower.CL upper.CL Above alpha ~0.5545 the confidence interval does not cover the point estimate. This is astonishing to me and fascinating, because in my belief the point estimate was always bracketed by a confidence interval.Is this correct? Or is there a hidden bug? The latter I can't imagine because the calculation is simple enough. — Regards, Detlew |
|
Helmut ★★★ ![]() Vienna, Austria, 2012-12-05 19:41 (4939 d 07:41 ago) @ d_labes Posting: # 9676 Views: 10,223 |
|
|
Dear Detlew! ❝ Above alpha ~0.5545 the confidence interval does not cover the point estimate. This is astonishing to me and fascinating, because in my belief the point estimate was always bracketed by a confidence interval. ❝ Is this correct? Or is there a hidden bug? The latter I can't imagine because the calculation is simple enough. What’s going on here? I always followed blindly Chow & Liu (Chapter 7); calculated a two-sided interval and used only the upper limit. I tried not to fall in the trap of using your code (which is fine, IMHO), but recalculated an example (the famous Clayton & Leslie data set from Table 6.9.1). Straightforward analysis in log-scale, SSintra 4.94398, MSintra 0.308999, 16 df). Now the confusion starts already. For CVintra I get 0.601715. They write “The estimated CV is about 36.55%…” I beg your pardon? Do they mean CVinter? No, that would be 0.334785. Anyhow, maybe just another typo.*I’m using their symbols.
Give it a try with alpha <- 0.9065 ![]()
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
|
d_labes ★★★ Berlin, Germany, 2012-12-06 10:21 (4938 d 17:01 ago) @ Helmut Posting: # 9680 Views: 10,191 |
|
|
Dear Helmut! ❝ What’s going on here? I always followed blindly Chow & Liu (Chapter 7); calculated a two-sided interval and used only the upper limit. Blindly following somebody is not always the best strategy to not falling into a trap.Two-sided is identical with one-sided calculated with alpha/2, I think. Further I think that you don't remember your own habit correctly. See your post dating back to the year 2006: "Since we are interested only in the upper limit of CV – if CV in the main study is lower than predicted, we are only gaining power – it may be better to apply a one-side approach instead." ![]() ❝ I tried not to fall in the trap of using your code (which is fine, IMHO), but recalculated an example (the famous Clayton & Leslie data set from Table 6.9.1). Straightforward analysis in log-scale, SSintra 4.94398, MSintra 0.308999, 16 df). Now the confusion starts already. For CVintra I get 0.601715. They write “The estimated CV is about 36.55%…” I beg your pardon? Do they mean CVinter? No, that would be 0.334785. Anyhow, maybe just a typo.*Chow & Liu's book (throughout all editions) is known to contain a massive number of typos. Thus be careful! ❝ I’m using their symbols. ❝ ❝ ❝ ❝ ❝ ❝ Fine. ❝ Give it a try with Your code gives the same answer as mine: CVCL(alpha=0.05, CV=0.6017, df=16, side="2-sided")Point estimate not contained in CI! Thus I think the code is validated and the effect we see is true. May be that my belief that a CI is bracketing the point estimate is relying on CIs for means. Of course no one rational thinking human being, except nitpickers like you and me , will set the error probability to such values >0.5.— Regards, Detlew |
|
Helmut ★★★ ![]() Vienna, Austria, 2012-12-06 12:14 (4938 d 15:09 ago) @ d_labes Posting: # 9681 Views: 10,139 |
|
|
Dear Detlew! ❝ Blindly Agree. ![]() ❝ Two-sided is identical with one-sided calculated with alpha/2, I think. This is what I thought (and still think). These formulas are so simple that I cannot imagine what’s going on here. ❝ Further I think that you don't remember your own habit correctly. See your post dating back to the year 2006: ❝ "Since we are interested only in the upper limit of CV – if CV in the main study is lower than predicted, we are only gaining power – it may be better to apply a one-side approach instead." OK, OK. ❝ Thus I think the code is validated and the effect we see is true. Ha! In my presentations on bioanalytics I use to make a distinction between “validated” and “valid”. Whilst the former means following a set of instructions (the validation plan) the latter means getting the “correct” results. That’s why I’m also skeptical about software vendor’s “validation packages”. If both the software and the validation package contains the same bug (2×2=5) we are proud about getting the expected results (validated) – which is still wrong… Following our private conversation your source was SA Julious. Now we followed different guide-dogs and got the same results. The code is validated. But is it valid? Would need a professional statistician to sort that out. Martin? Jack? ❝ May be that my belief that a CI is bracketing the point estimate is relying on CIs for means. Duno. IMHO valid for any kind of point estimator (the mean being just one of them). Now I’m lost. Like you I always thought the two-sided CI gives the range containing the expected value at 1–α/2. In the extreme cases of α=0 the CI should be -∞,+∞* and for α=1 CLlo=PE=CLhi. As our Indian friends use to say: Correct me if I’m wrong. ❝ Of course no one rational thinking human being, except nitpickers like you and me Right. Sorry opening another can of worms.
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
|
Helmut ★★★ ![]() Vienna, Austria, 2012-12-07 16:51 (4937 d 10:32 ago) @ Jack Posting: # 9691 Views: 10,120 |
|
|
Hi Jack! ❝ In principle it is possible to have a confidence interval that does not include the point estimate that is still valid (i.e. has the correct coverage). It is, however, not something that would be considered a "good" confidence interval because the result of a hypothesis test would not necessarily match the conclusion based on a CI which obviously has all sort of flaws. THX for the clarification from a Pro. Shows once more that common sense is not always applicable in science. ![]() — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
|
d_labes ★★★ Berlin, Germany, 2012-12-06 16:04 (4938 d 11:19 ago) @ Helmut Posting: # 9683 Views: 10,115 |
|
|
Dear Helmut! ❝ ... Now I’m lost. Like you I always thought the two-sided CI gives the range containing the expected value at 1–α/2. In the extreme cases of α=0 the CI should be -∞,+∞* ❝ * For the normal distribution. Here \(]0,+\infty]\ldots\) Agree. (Although I think this is no longer statistics) This is what the formulas give. CVCL(CV=0.3, df=10, side='upper',alpha=0)❝ and for α=1 CLlo=PE=CLhi. As our Indian friends use to say: Correct me if I’m wrong. Do not agree. α=1 means that we err in 100% of cases. Means that in no case the confidence interval includes the population parameter of interest, mean, variance or whatever we are interested in. For a variance >0 this can only achieved for the interval (0,0) if we talk one-sided upper. Dunno a same argument for two-sided. Here we have to err in 50% of the cases where population value is > (≥?) PE and another 50% where population value is < (≤?) PE. — Regards, Detlew |
|
Helmut ★★★ ![]() Vienna, Austria, 2012-12-07 16:40 (4937 d 10:43 ago) @ d_labes Posting: # 9690 Views: 10,116 |
|
|
Dear Detlew! ❝ ❝ and for α=1 CLlo=PE=CLhi. As our Indian friends use to say: Correct me if I’m wrong. ❝ Do not agree. α=1 means that we err in 100% of cases. Means that in no case the confidence interval includes the population parameter of interest, mean, variance or whatever we are interested in. Exactly. Maybe this is not statistics any more. Would you say there is a cut-off (e.g., 0.5) rendering a CI meaningless? ❝ For a variance >0 this can only achieved for the interval (0,0) if we talk one-sided upper. To be honest my brain works two-sided only. I can work with one-sided CIs but never mastered a full understanding of them. ∞ somehow scares me (a case of horror vacui?)… — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
|
ElMaestro ★★★ Denmark, 2012-12-07 23:40 (4937 d 03:42 ago) @ Helmut Posting: # 9693 Views: 10,066 |
|
|
Meine Herren, if I understand what a PE is and if I understand what a CI is then this thread is rather meaningless. I will be happy to conclude that then I probably don't understand these matters. I will even be happy to admit that I see no point in CIs that do not span over the PEs. An alternative: It should be possible to use a Monte Carlo approach here. Simulate a gazillion trials, get the CVs and see within which limits they are distributed? While we are at it: The formulae above involve chi-squares, but I do not see what the relationship is to the sample distribution of CVs, cf. possibly Hendricks and Robey 1936. Is it the same? We are beyond my personal understanding of maths but shouldn't that paper be where this discussion should start? ![]() — Pass or fail! ElMaestro |
|
d_labes ★★★ Berlin, Germany, 2012-12-09 17:20 (4935 d 10:03 ago) @ ElMaestro Posting: # 9698 Views: 10,208 |
|
|
Dear Ol'Pirate, ❝ if I understand what a PE is and if I understand what a CI is then this thread is rather meaningless. I will be happy to conclude that then I probably don't understand these matters. I will even be happy to admit that I see no point in CIs that do not span over the PEs. And if you don't understand? ❝ While we are at it: The formulae above involve chi-squares, but I do not see what the relationship is to the sample distribution of CVs, cf. possibly Hendricks and Robey 1936. Is it the same? ❝ We are beyond my personal understanding of maths but shouldn't that paper be where this discussion should start? No definitely not. IMHO your reference deals with the conventional CV i.e sd/µ but we here are dealing with the CV of log-normal data. That means we are dealing basically with the distribution of the sampling variance. And this distribution and CIs based on it are already described in basic statistic textbooks. Astonishing enough these long and well-known CIs have the above discussed feature. But notice: only if you set the error probability to values >0.5. No one will do that in practice of course. Thus you are totally right: This thread is rather meaningless practically. In the same sense as this thread which was kicked off by an well known nitpicker .But beside the original simple aim to validate some code it may be one can learn something about such basic statistics if one pushes them at their extreme. — Regards, Detlew |
|
d_labes ★★★ Berlin, Germany, 2012-12-10 09:25 (4934 d 17:58 ago) @ Helmut Posting: # 9700 Views: 10,036 |
|
|
Dear Helmut! ❝ To be honest my brain works two-sided only. I can work with one-sided CIs but never mastered a full understanding of them. One of best justification of a two-sided test/CI ... I have ever seen .And this from a guy which works nearly all the days with TOST. — Regards, Detlew |
|
Helmut ★★★ ![]() Vienna, Austria, 2012-12-11 15:54 (4933 d 11:29 ago) @ d_labes Posting: # 9711 Views: 10,299 |
|
|
Dear Detlew! ❝ ❝ To be honest my brain works two-sided only. […] ❝ ❝ One of best justification of a two-sided test/CI ... I have ever seen ❝ And this from a guy which works nearly all the days with TOST. No, I don’t. Only in less than a handful of studies 25 years ago – upon sponsor’s wish (“Hey, that’s new = fashionable and suggested by an FDA guy!”) – I applied TOST, i.e., reported a result like: p(<0.8) 0.0014 ʌ p(>1.25) 0.0034 When I started in the early 1980s (without knowing any literature at all) I naïvely calculated a two-sided 95% CI. Later I adapted for the 90% CI, though the term “operationally equivalent” to TOST gave me headaches. I wouldn’t go that far calling it just “an algebraic coincidence”1 but I don’t get the point why the straightforward confidence interval inclusion (one H0 and H1) $$H_0:\frac{\mu_T}{\mu_R}\notin [\theta_1,\theta_2]\;\mathit{vs.}\;H_1:\theta_1<\frac{\mu_T}{\mu_R}<\theta_2$$ should be replaced by a {set} of two Nulls and Alternatives, $$H_{0L}:\frac{\mu_T}{\mu_R}\leq \theta_1\;{vs.}\;H_{1L}:\frac{\mu_T}{\mu_R}>\theta_1$$ $$H_{0U}:\frac{\mu_T}{\mu_R}\geq \theta_1\;{vs.}\;H_{1U}:\frac{\mu_T}{\mu_R}<\theta_1$$ tested on the same body of data. For an overview see Berger & Hsu (including comments by Hauck, Anderson, Meredith, Heise, Liu, Chow, Schuirmann, and Hwang).2 ![]()
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
|
ElMaestro ★★★ Denmark, 2012-12-11 16:41 (4933 d 10:42 ago) @ Helmut Posting: # 9712 Views: 9,968 |
|
|
Hi Helmut, you illogical caveman, ❝ To be honest my brain works two-sided only. I can work with one-sided CIs but never mastered a full understanding of them. ❝ ∞ somehow scares me (a case of horror vacui?)… If you think one one-sided test is difficult to work with, then how come you find two one-sided tests easier?? Two plus two equals four, at least that's what I got last time I used Excel. — Pass or fail! ElMaestro |
|
Helmut ★★★ ![]() Vienna, Austria, 2012-12-11 17:12 (4933 d 10:10 ago) @ ElMaestro Posting: # 9713 Views: 10,054 |
|
|
Hi ElMaestro! ❝ […] you illogical caveman, How did you know? ![]() ![]() ![]() ![]() ![]() ![]() ❝ If you think one one-sided test is difficult to work with, then how come you find two one-sided tests easier?? Didn’t say that. Outing myself a statistical ignorant: I find one two-sided test easier. ❝ Two plus two equals four, at least that's what I got last time I used Excel. That’s a professional deformation I owe to my engineering background. I’m fine with statements like “about two plus about two gives roughly four”. If we know how large the two “abouts” are we can even state “four ± somefink”. ![]() — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
Above alpha ~0.5545 the confidence interval does not cover the point estimate. This is astonishing to me and fascinating, because in my belief the point estimate was always bracketed by a confidence interval.
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
![[image]](https://static.bebac.at/img/CC by.png)
following somebody is not always the best strategy to not falling into a trap.

![[image]](img/uploaded/image28.png)
![[image]](http://members.chello.at/helmut.schuetz/pics/FM1.jpg)
![[image]](http://members.chello.at/helmut.schuetz/pics/Kata5.jpg)
![[image]](http://members.chello.at/helmut.schuetz/pics/Kata4.jpg)
![[image]](http://members.chello.at/helmut.schuetz/pics/Kata6.jpg)
![[image]](http://members.chello.at/helmut.schuetz/pics/Kata2.jpg)
![[image]](http://members.chello.at/helmut.schuetz/pics/Kata1.jpg)
![[image]](http://www.searchenginepeople.com/i/yes-we-can.jpg)
