R Under development (unstable) (2026-02-23 r89457 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## > ## internal multiframe checks of subpopulations > ## > > > library(survey) Loading required package: grid Loading required package: Matrix Loading required package: survival Attaching package: 'survey' The following object is masked from 'package:graphics': dotchart > > data(phoneframes) > A_in_frames<-cbind(1, DatA$Domain=="ab") > B_in_frames<-cbind(DatB$Domain=="ba",1) > > Bdes_pps<-svydesign(id=~1, fpc=~ProbB, data=DatB,pps=ppsmat(PiklB)) > Ades_pps <-svydesign(id=~1, fpc=~ProbA,data=DatA,pps=ppsmat(PiklA)) > mf_pps<-multiframe(list(Ades_pps,Bdes_pps),list(A_in_frames,B_in_frames),theta=0.7417399) > > glm1<-svyglm(Lei~0+Domain, design=mf_pps) > m1a <- svymean(~Lei, subset(mf_pps, Domain=="a")) > stopifnot(all.equal(as.vector(coef(glm1))[1], as.vector(coef(m1a)))) > stopifnot(all.equal(as.vector(SE(glm1)[1]), as.vector(SE(m1a)))) > > > stopifnot(all.equal(coef(svymean(~Lei, subset(mf_pps, Domain=="a"))), + coef(svymean(~Lei, subset(Ades_pps, Domain=="a"))))) > > stopifnot(all.equal(as.vector(SE((svymean(~Lei, subset(mf_pps, Domain=="a"))))), + as.vector(SE(svymean(~Lei, subset(Ades_pps, Domain=="a")))))) > > > glm1<-svyglm(Lei~0+Domain, design=mf_pps) > m1a <- svymean(~Lei, subset(mf_pps, Domain=="a")) > all.equal(as.vector(coef(glm1))[1], as.vector(coef(m1a))) [1] TRUE > all.equal(as.vector(SE(glm1)[1]), as.vector(SE(m1a))) [1] TRUE > > > m2 <- svymean(~Lei, subset(mf_pps, Domain %in% c("a","ab"))) > m2a<-svymean(~Lei, Ades_pps) > > > proc.time() user system elapsed 0.96 0.20 1.15