[R] package survey
Joel Schwartz
joel at joelschwartz.com
Sun Dec 19 02:11:38 CET 2010
> and does anyone know if it is possible to find the codes for
> functions in survey package?
Yes, you can find the code by doing the following:
1) Go to the CRAN R package list (http://cran.r-project.org/web/packages/),
scroll down to the "survey" package link and click on it.
2) Scroll down to the "Downloads" section and download the "package source"
file. The "R" folder in this file contains the code for the functions in the
package.
You can of course follow an analogous procedure to get the code for other
packages.
There might be an easier or quicker way to do it from within R but ,if there
is, I haven't learned it yet.
Joel
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of andrija djurovic
> Sent: Saturday, December 18, 2010 4:23 PM
> To: r-help at r-project.org
> Subject: [R] package survey
>
> Hi R users,
>
> could someone help me to find out which formulas, for
> standard error calculation, are used in following example:
>
> a=data.frame(weights=rep(c(10,1),c(4,1)),fpc=rep(41,5),uk=rep(1,5))
>
> srs<-svydesign(id=~1, weights=~weights, data=a)
>
> srs1<-svydesign(id=~1, weights=~weights,fpc=~fpc, data=a)
>
> svytotal(~uk,srs)
> total SE
> uk 41 9
>
> svytotal(~uk,srs1)
> total SE
> uk 41 8.4334
>
> and does anyone know if it is possible to find the codes for
> functions in survey package?
>
> thanks in advance
>
> Andrija
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
More information about the R-help
mailing list