search for: svyciprop

Displaying 11 results from an estimated 11 matches for "svyciprop".

2018 Mar 06
4
Capturing warning within user-defined function
...head(dta) str(dta) # declare design my.svy <- svydesign(ids=~1, weights=~wt, data=dta) # subset grp1 <- subset(my.svy, grp == "Group1") # set options and clear old warnings options(warn=0) assign("last.warning", NULL, envir = baseenv()) ## proportions and CIs p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) # save warnings wrn1 <- warnings(p) ci_l <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[1]) ci_u <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[2]) ## sample counts n <- unwtd.count(~grp, grp1)[1]...
2018 Mar 06
1
Capturing warning within user-defined function
...gt; > > # subset > > grp1 <- subset(my.svy, grp == "Group1") > > > > # set options and clear old warnings > > options(warn=0) > > assign("last.warning", NULL, envir = baseenv()) > > > > ## proportions and CIs > > p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) > > > > # save warnings > > wrn1 <- warnings(p) > > > > ci_l <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[1]) > > ci_u <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')...
2018 Mar 06
0
Capturing warning within user-defined function
...;- svydesign(ids=~1, weights=~wt, data=dta) > > # subset > grp1 <- subset(my.svy, grp == "Group1") > > # set options and clear old warnings > options(warn=0) > assign("last.warning", NULL, envir = baseenv()) > > ## proportions and CIs > p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) > > # save warnings > wrn1 <- warnings(p) > > ci_l <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[1]) > ci_u <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[2]) > > ## sample count...
2018 Mar 06
0
Capturing warning within user-defined function
...;- svydesign(ids=~1, weights=~wt, data=dta) > > # subset > grp1 <- subset(my.svy, grp == "Group1") > > # set options and clear old warnings > options(warn=0) > assign("last.warning", NULL, envir = baseenv()) > > ## proportions and CIs > p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) > > # save warnings > wrn1 <- warnings(p) > > ci_l <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[1]) > ci_u <- (confint(svyciprop(~grp, grp1, family=quasibinomial), 'ci')[2]) > > ## sample count...
2012 Sep 21
1
Exactly Replicating Stata's Survey Data Confidence Intervals in R
...d count matches exactly svytotal( ~!is.na(ell), dclus1) # number of clusters match exactly dclus1 # none of the confidence interval options match exactly # the standard confint() will certainly be wrong, # since stata gives an asymmetric confidence interval confint(svymean(~I(ell==0), dclus1)) svyciprop(~I(ell==0), dclus1, method="me") # 2nd way to perform confint() # but none of the other methods match either.. svyciprop(~I(ell==0), dclus1, method="li") svyciprop(~I(ell==0), dclus1, method="lo") svyciprop(~I(ell==0), dclus1, method="as") svyciprop(~I(e...
2009 Sep 23
1
survey package (3.18)
Version 3.18 of the survey package is now percolating through CRAN. Since the last announcement on this list, in February, the main additions are - standard errors for survival curves (both Kaplan-Meier and Cox model) - svyciprop() for confidence intervals on proportions, especially in small samples or near 0 or 1. - predictive margins by direct standardization, with marginpred() - two-phase subsampling designs can now have arbitrary multistage designs at each phase - Rao-Scott-type likelihood ratio tests are now avai...
2009 Sep 23
1
survey package (3.18)
Version 3.18 of the survey package is now percolating through CRAN. Since the last announcement on this list, in February, the main additions are - standard errors for survival curves (both Kaplan-Meier and Cox model) - svyciprop() for confidence intervals on proportions, especially in small samples or near 0 or 1. - predictive margins by direct standardization, with marginpred() - two-phase subsampling designs can now have arbitrary multistage designs at each phase - Rao-Scott-type likelihood ratio tests are now avai...
2013 Jan 03
1
Survey package help with svystandardize
...| | | Percent | 20.05 | 24.69 | 16.34 | -------------------------------------------------------------------------------- ------------------------- R Output: Estimate for the total is off. > svyciprop(~I(rfsmok=="At risk"), stdes, na.rm=TRUE, ci=TRUE, vartype="ci") 2.5% 97.5% I(rfsmok == "At risk") 0.187685 0.176309 0.19962 Estimates by sex are a match. > svyby(~I(rfsmok=="At risk"),...
2012 Oct 11
2
survey package question
...e 2= 5323 / 10874= .4895 candidate 3= 3419 / 10874= .3144 In this case, the unit of analysis is voters (or votes). If I specify the sampling design using the survey package in this way... design <-svydesign(id=~station + unit fpc=~probstation +probunit, data=sample, pps="brewer") svyciprop(~I(candidate1/totalVotes), design) ... I am assuming that the unit of analysis is the voting unit, right? and I am estimating an average among voting units? I should expand my database at individual level (voters), or I just have to include a unit weight according to the number of voters for voti...
2010 May 21
1
viewing function code
Hi, I want to view the code for the function confint in the stats package. Typing just confint doesn't work. How can I view the code? Thanks, Walt ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 ________________________ (V) 609-936-8999 (F) 609-936-3733 walt at dataanalyticscorp.com www.dataanalyticscorp.com
2009 Apr 03
1
Survey Package with Binary Data (no Standard Errors reported)
Hi, I'm trying to get standard errors for some of the variables in my data frame. One of the questions on my survey is whether faculty coordinate across curriculum to include Arts Education as subject matter. All the responses are coded in zeros and ones obviously. For some of the other variables I have a 2 for those that responded with "Don't Know". I'm getting NA for