[R] Survey package/svyby source code help

A@dertechLLC m@iii@g oii proto@m@ii@com A@dertechLLC m@iii@g oii proto@m@ii@com
Tue Feb 11 16:23:14 CET 2020


Thank you for responding.
I am truly grateful.
Apologies for omitting evident and pertinent information.

I am using 3.36.  I will update to 3.37.  I did not notice the newer version.

I realize I needed to be more specific.  The attr(, "var") that I am interested in is displayed with str(results) after the results object is declared.  First line of the subject code looks like:

results <- (if (multicore) parallel::mcapply else lapply)(uniques, function(i){....

How that line functions without error is beyond me, but minor to my objective.

Disclosing my prime goal, I am trying to produce the same values generated by the confint function, which receives the standard error values from this svyby function.  I am trying to replicate the standard error calculation in R and use it in a known program called Tableau.

If any other information is needed please let me know.

My sincerest gratitude.





‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, February 11, 2020 9:42 AM, Ivan Krylov <krylov.r00t using gmail.com> wrote:

> On Tue, 11 Feb 2020 02:33:45 +0000
> AndertechLLC--- via R-help r-help using r-project.org wrote:
>
> > When debugging the code I am not following the generation of values
> > in the results object attr(*, "var")" after line 57 completes. These
> > values are fed into line 74 (rval <- t(sapply(results, unwrap))).
>
> Which version of the survey package you have in mind? I took a look at
> the latest version available on CRAN (3.37 at the time of this post,
> []) and the R/surveyby.R file has somewhat different code on lines 57
> and 74.
> In particular, attr(, "var") is assigned much later, from variablenamed covmat.mat, which is also computed later than line 74.
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Best regards,
> Ivan
>
> [*] https://cran.r-project.org/src/contrib/survey_3.37.tar.gz



More information about the R-help mailing list