What the weight argument does is documented in many places, and is part of
the definition of a glm. It may mean
`I have w_i independent observations exactly like this example'
and one could conceive of other situations what gave the same
log-likelihood as that interpretation.
I think your friend's data would be much better analyzed as binomial
logistic regression, the response being the number of successes out of 15,
and that would be the case even if the replications were independent.
The best way to do that is to have a two-column matrix response
glm(cbind(R, 15-R) ~ rhs, family=binomial)
where R is the number of successes.
You will probably then have to deal with over-dispersion of the data, and
that can be handled although S-PLUS is not consistent and care is needed.
Reference: Chapter 7 of Venables & Ripley (2002) Modern Applied Statistics
with S.
On Tue, 27 Jan 2004, Rodrigo A. Santinelo Pereira wrote:
> Dear all,
>
> A friend of mine who is not subscribed has a doubt concerning "weight and
> logistic regression". He asked me to submit his question.
>
> Many thanks in advance,
> Rodrigo Pereira
> ________________________
> Hi,
>
> I have a problem on the usage of S-plus to carry a logistic regression that
> I believe someone in the list could help.
>
> I have data on whether a stone in a streambed moved in relation to three
> independent variables:
>
> (1) amount of rainfall in the 2-months period stones remained in the
> stream, treated as continuos, 6 periods.
> (2) mean discharge of the stream, treated as continuos, 5 streams.
> (3) size of the stone, categorical, 2 size classes.
>
> I have thus 60 (=6 x 5 x 2) combinations of the variables. For each
> combination, I have data on exactly 15 experimental, previously painted
> stones.
> A critic raised by a referee was that stones in the 15 stones set were not
> independent to each other. If a stone in a given combination of treatments
> moved, it is likely that other would move too as they are neighborhoods
> spatially. They are pseudoreplications. In other words, I could not enter
> each stone as an observation (899 d.f. ~ 60 x 15).
> I believe the referee should be right. After studying some books and the
> S-plus help, I found that there is a possibility to enter data as
> proportions and then assigning a weight to it. In my case, I would use each
> 15 stones set to produce a proportion. I preliminarily carried the analysis
> using proportions and observed that S-plus treats each proportion as one
> degree of freedom (59 d.f. for the study). However, given that each
> proportion is based on exactly 15 stones, each proportion has exactly the
> same weight. I carried some analysis using in each one weights 1, 5 and 10
> and observed that each one produced different results (estimates are the
> same, but error of them as well as deviance are different).
>
> My questions are:
>
> Do someone know what exactly WEIGHT do?
> How should I weight my data?
> Am I doing the correct analysis?
> Any comment will be of great value.
>
> Best wishes,
>
> Adriano S. Melo <grumicha@yahoo.com.br>
> Dep. Biologia, FFCLRP
> Universidade de São Paulo
> 14040-901 - Ribeirão Preto - SP
> Brazil
>
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
|