Dear Allstatters,
I must apologise for my belated summary of the responses I received to my
query. I have not been able to respond to people individually but I would
like to record my thanks for the interesting responses I received.
In the end, I received 4 comprehensive responses and I have reproduced them
here. My take on these is that in future, I should explore transformations
using the beta distribution which does make sense to me. However, another
alternative is a truncated normal distribution, which I do recall using many
years ago in one instance. The original query I posed is at the bottom of
this email.
--------------------------------
FROM: Robert Newcombe, [log in to unmask]
I don't have a solution straight off. You are right to want to avoid a CI
that violates the boundary - and truncation isn't an adequate workaround.
In any case, start by linearly scaling a and b to 0 and 1. Two issues you
should consider. First, just what parameter of the distribution are you
seeking to estimate? Presumably the mean. But as soon as you use a
non-linear scale transformation, you alter this - as a simple example, the
mean on log-transformed data transforms back to the geometric mean, which is
always less than the arithmetic mean.
Also, the alternative to using a catch-all t-interval (on the basis that it
is pretty robust under many circumstances) is to use an interval based on
some other fittable distribution. An obvious alternative to N(mu, sigma^2)
which has an inappropriate infinite support is a beta-distribution, for
which the support is correctly [0,1]. Google found a couple of references to
both frequentist and Bayes intervals for the two parameters alpha and beta
of the beta distribution, but these don't come with an obvious
implementation, nor was it obvious what data was being fed in. But, if
you're interested in the mean, you don't want these parameters anyway, but a
quantity derived from them, alpha/(alpha+beta). So this is of little help.
It should be reasonably straightforward to fit a beta distribution using
MCMC. This can easily yield an interval for alpha/(alpha+beta) as well as
intervals for alpha and beta. But I'm not at all sure what would be an
appropriate uninformative prior for either of these parameters separately,
let alone jointly. With a large sample size, of course, this wouldn't have
too much effect.
Note that the beta distribution can represent some, but not all, possible
distribution shapes on [0,1]. A simple unimodal distribution, or a bimodal
one with peaks at 0 and 1, may be respresented by a beta model. If there are
two peaks not at these extremities - or if there are 3 peaks, as
sometimes occurs with visual analogue scale data - then a beta model would
be inappropriate.
----------------------------------------
From Graeme Maclennan, [log in to unmask]
Shot in the dark, but I have found this paper useful in analysing health
psychology data on scales that are closed on a particular interval, this
paper addresses how to address the out of interval predictions and CIs, it
may be useful. (It maintains a bounded interval though, I think by using the
same suggestion as below, or something similar)
http://psychology.anu.edu.au/people/smithson/details/betareg/Smithson_Verkui
len06.pdf
----------------------------------------
From Jingsng Yuan, [log in to unmask]
Another thing to look out for, apart from the domain and the range of the
transformation, is the distribution of the transformed data. Ideally this
will be a normal distribution. Not having seen a histogram of your data, it
may be difficult to suggest an appropriate transformation.
Alternatively you can fit a truncated or censored distribution to the
original data and find confidence intervals etc using standard maximum
likelihood theory. Since you worry about P(X=a) and P(X=b), I guess your
data may be censored rather than truncated. You can try a censored normal
distribution if the histogram suggests that may be appropriate. Here is a
reference: Schnedler, Wendelin (2005). "Likelihood estimation for censored
random vectors". Econometric Reviews 24 (2),195?217. You can check the
goodness-of-fit afterwards.
----------------------------------------
From Karl Schlag, [log in to unmask]
It is not that simple. Note that if you transform the data into an unbounded
domain and then analyze the data then you should relate the transformation
to your assumptions on the data generating process. I assume you are using a
method that is based on normally distributed variables and which is
justified for sufficiently large samples.
Different transformations will have different properties in terms of how
large the sample has to be in order for asymptotics to kick in. You cannot
try different transformations and look at the data to see if it looks
normal. You can but this is not sound statistics.
However, there is no need to transform the data if you use confidence
intervals that respect the fact that the data belongs to [a,b]. It all
depends the type of data you have. If your data is based on an independent
sample then I have such an exact test and there are others, e.g. Romano and
Wolf (2000).
-------------------------------------------
Regards
Nigel Marriott
Chartered Statistician
www.marriott-stats.com
Ground Floor, 21 Marlborough Buildings, Bath BA1 2LY, United Kingdom
Tel (mobile) +44 (0)773 4069997
Tel (office) +44 (0)1225 489033
Fax +44 (0)870 6221969
Marriott Statistical Consulting Limited, Company No. 5577275, VAT No.
883304029
Registered in England, Registered Office – Equity House, 4-6 School Road,
Tilehurst, Reading, RG31 5AL
-----Original Message-----
Subject: QUERY: Transforming a closed bounded interval [a,b]
Dear Allstatters,
I am analysing a data set which is continuous on a closed interval [a,b].
Globally, this data is symmetrically distributed across the interval, but I
need to prepare summaries at a local level (such as postcodes) including an
estimate with a confidence interval. Naturally to avoid silly confidence
intervals which breach the interval [a,b], I need to transform the interval
to an open unbounded one instead. If the interval was open i.e. (a,b) then
the logit transformation Log( (x-a)/b-x) ) would be perfect but clearly this
is not suitable when x equals a or b. I have been unable to find a suitable
alternative so I am proposing to use the transformation Log( (x-a+k)/(b-x+k)
) where k is a small number say 1% of b-a. I have used this in the past and
I recognise that this is not perfect solution so I would be grateful if
someone from the ALLSTAT list could suggest a better transformation. The
best I have found so far is this article
http://biostatistics.oxfordjournals.org/cgi/reprint/8/1/72 but I don't think
this is quite what I am looking as it doesn't deal with continuous data on
[a,b].
|