[R] Weighting factor
ferran.carrascosa at gmail.com
Tue Sep 27 22:58:44 CEST 2005
This package is very interesting, very thank you Thomas.
Thanks to all!
2005/9/27, Thomas Lumley <tlumley at u.washington.edu>:
> On Tue, 27 Sep 2005, Ferran Carrascosa wrote:
> > Hi everyone,
> > I would like some package of R or any help to solve the next problem
> > with a weighting fatcors:
> > Giving a data matrix with dichotomous (2 or more) variables in columns
> > and individuals in rows, and also a theorical distribution of the
> > dichotomous variables I would like a row weight (one per individual)
> > that transform the real distribution of variables to the theorical
> > distribution.
> You should be able to do this with postStratify() in the survey package
> (if you have joint distributions for the variables) or calibrate() if you
> have only marginal distributions.
> You would need to create a survey design object, use postStratify() or
> calibrate() on it, then use weights() to extract the weights.
More information about the R-help