Hi everyone, Does anyone know if there is a package to compute raking weights using R? What I need is to create a variable with weights base in some demographic variables (e.g. sexo, age group, area) using the raking procedure. Thank you in advance! -- Sebasti?n Daza
On Nov 9, 2011, at 2:27 PM, Sebasti?n Daza wrote:> Hi everyone, > Does anyone know if there is a package to compute raking weights using > R? What I need is to create a variable with weights base in some > demographic variables (e.g. sexo, age group, area) using the raking > procedure.There is a `rake` function in package "survey". In the future you ought to do this at the R console _before_ sending a question to R-help: RSiteSearch("raking")> > Thank you in advance! > > -- > Sebasti?n Daza > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD West Hartford, CT
I did. However, I am not sure that I can create a "weight variable" in my database with the rake function you mention. That is why I am asking. El d?a 9 de noviembre de 2011 13:44, David Winsemius <dwinsemius at comcast.net> escribi?:> > On Nov 9, 2011, at 2:27 PM, Sebasti?n Daza wrote: > >> Hi everyone, >> Does anyone know if there is a package to compute raking weights using >> R? What I need is to create a variable with weights base in some >> demographic variables (e.g. sexo, age group, area) using the raking >> procedure. > > There is a `rake` function in package "survey". > > In the future you ought to do this at the R console _before_ sending a > question to R-help: > > RSiteSearch("raking") > >> >> Thank you in advance! >> >> -- >> Sebasti?n Daza >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > David Winsemius, MD > West Hartford, CT > >-- Sebasti?n Daza
On Nov 9, 2011, at 3:07 PM, Sebasti?n Daza wrote:> I did. However, I am not sure that I can create a "weight variable" in > my database with the rake function you mention. That is why I am > asking. >Since you have provided absolutely no information about the data you have or the problem you are trying to solve, you cannot expect anyone here to tell you what the one right function will be. You need to _do_the_search_yourself_ and determine which (if any) of the 36 hits it brings up are relevant to your (as yet incredibly vague) problem. Further hits are possible if you click the r-help buttons which will them bring up all the questions for the years indicated -- David.> El d?a 9 de noviembre de 2011 13:44, David Winsemius > <dwinsemius at comcast.net> escribi?: >> >> On Nov 9, 2011, at 2:27 PM, Sebasti?n Daza wrote: >> >>> Hi everyone, >>> Does anyone know if there is a package to compute raking weights >>> using >>> R? What I need is to create a variable with weights base in some >>> demographic variables (e.g. sexo, age group, area) using the raking >>> procedure. >> >> There is a `rake` function in package "survey". >> >> In the future you ought to do this at the R console _before_ >> sending a >> question to R-help: >> >> RSiteSearch("raking") >> >>> >>> Thank you in advance! >>> >>> -- >>> Sebasti?n Daza >> >> David Winsemius, MD >> West Hartford, CT >> >> > > > > -- > Sebasti?n DazaDavid Winsemius, MD West Hartford, CT
2011/11/10 Sebasti?n Daza <sebastian.daza at gmail.com>:> I did. However, I am not sure that I can create a "weight variable" in > my database with the rake function you mention. That is why I am > asking. >Yes, you can. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland