Re: [R] Survey design for multilevel analysis

2022-02-01 Thread Jim Lemon
Hi Love, I have finally had a chance to look at this more closely. I think that the following link: https://cran.r-project.org/web/packages/survival/vignettes/adjcurve.pdf may be useful. See section 4.2. This is not my area of expertise, but it seems to be a known problem. Perhaps by posting to t

Re: [R] Survey package/svyby source code help

2020-02-11 Thread AndertechLLC--- via R-help
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(result

Re: [R] Survey package/svyby source code help

2020-02-11 Thread Ivan Krylov
On Tue, 11 Feb 2020 15:23:14 + andertech...@protonmail.com wrote: > 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)(uniq

Re: [R] Survey package/svyby source code help

2020-02-11 Thread Ivan Krylov
On Tue, 11 Feb 2020 02:33:45 + AndertechLLC--- via R-help 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 t

[R] Survey package/svyby source code help

2020-02-11 Thread AndertechLLC--- via R-help
Good day, I was looking for some help with understanding a particular portion of the svyby source code. 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,

Re: [R] Survey Data - comparing multiple groups

2019-08-16 Thread Mavra Ahmed
this point, I am still exploring R and if I am able to provide additional feedback on this issue, I will post. I really appreciate your help. Thank you. From: Abby Spurdle Sent: July 27, 2019 9:39:49 PM To: Mavra Ahmed Cc: r-help@r-project.org Subject: Re: [R

Re: [R] Survey Data - comparing multiple groups

2019-07-27 Thread Abby Spurdle
> I would like to be able to get p-values between the groups and be able to adjust for multiple comparisons and would appreciate if someone can guide me. > I did convert my df into a svrepdesign object as follows: > > df<-svrepdesign (data=df1, scale=1, repweights = df1[, 496:995], type="BRR", com

Re: [R] Survey Data - comparing multiple groups

2019-07-25 Thread Mavra Ahmed
vra Ahmed Cc: r-help@r-project.org Subject: Re: [R] Survey Data - comparing multiple groups > I have ran Kruskal Wallis as follows but get the following error: > svyranktest(CARB ~ group, df, test=c("KruskalWallis")) >From the survey package, I assume. And df is a data frame, I also

Re: [R] Survey Data - comparing multiple groups

2019-07-25 Thread Abby Spurdle
> I have ran Kruskal Wallis as follows but get the following error: > svyranktest(CARB ~ group, df, test=c("KruskalWallis")) >From the survey package, I assume. And df is a data frame, I also assume. (Complete self-contained examples are good). I checked the documentation. The second argument is

[R] Survey Data - comparing multiple groups

2019-07-25 Thread Mavra Ahmed
Hi Everyone, I am trying to assess whether the mean of carbohydrate intake (dependent variable = continuous) is significantly different between five groups (groups = people categorized into five different groups) (independent variable= categorical). This is survey data with replicates and ther

Re: [R] [R Survey Analysis] Problem counting number of responses

2016-08-16 Thread Jim Lemon
Hi Lauren, As Sarah noted, if your blank responses are coming as NAs, it may be best to leave them alone until you have done the calculations: survey$responses<-!is.na(survey[,c("q1","q2","q3")]) survey$sum_survey<-rowSums(survey[,c("q1","q2","q3")],na.rm=TRUE) # the next line returns a logical ve

Re: [R] [R Survey Analysis] Problem counting number of responses

2016-08-16 Thread Sarah Goslee
Hi Lauren, I'm not entirely sure what your sample code is suppoesd to do, since it isn't complete R code, and it would be much easier to answer your question if you provided sample data and didn't post in HTML. dput(head(survey)) would be enough sample data, most likely. But if I'm understandin

Re: [R] [R Survey Analysis] Problem counting number of responses

2016-08-16 Thread Greg Snow
Lauren, The easier that you make it for us to help you, the more likely you are to get help and the more helpful the answers will be. First, please post in plain text (not HTML). Second, reproducible code (including sample data) helps us help you. Your code above is incorrect, the 3 lines with

[R] [R Survey Analysis] Problem counting number of responses

2016-08-16 Thread Lauren Bolger
M ​y dataset includes a survey completed by research participants to evaluate quality of life. A few things regarding the survey: - *not all questions must be answered​ for the total score * - questions left blank are coded as "0" - ​the number of questions answered must be determined in

[R] survey package rake results in very large weights

2015-01-19 Thread Imran Akbar
Hi, I'm trying to use both the survey package and the anesrake package to perform raking on my sample dataset, to get the proportions to match up with population data from the census. I'm trying the following, but the resulting weights are very large: > svy.unweighted <- svydesign(ids=~1, dat

Re: [R] "survey" package -- doesn't appear to match svy

2014-10-28 Thread Anthony Damico
could you provide a minimal reproducible example? perhaps use ?dput. in general the survey package matches all other languages http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Damico.pdf here's an example of a minimal reproducible example that does match http://www.ats.ucla.edu/stat

[R] "survey" package -- doesn't appear to match svy

2014-10-27 Thread Stephen Amrock
Hi, I'm new to R and have encountered two issues in coding using the "survey" package: (1) Code from *svytable* using "survey" package does not correspond to Stata estimates from *svy: tab*. I call svyd.nation <- svydesign(ids = ~1, probs = ~wt_national, strata = ~stratum, data=nats.sub)

Re: [R] Survey

2014-04-06 Thread David Winsemius
On Apr 6, 2014, at 2:36 AM, Anthony Damico wrote: hi leandro, in case you're already familiar with ibge's pnad, you might find these examples useful-- http://www.asdfree.com/search/label/pesquisa%20nacional%20por%20amostra%20de%20domicilios%20%28pnad%29 https://github.com/ajdamico/usgsd/tre

Re: [R] Survey

2014-04-06 Thread Anthony Damico
hi leandro, in case you're already familiar with ibge's pnad, you might find these examples useful-- http://www.asdfree.com/search/label/pesquisa%20nacional%20por%20amostra%20de%20domicilios%20%28pnad%29 https://github.com/ajdamico/usgsd/tree/master/Pesquisa%20Nacional%20por%20Amostra%20de%20Domi

Re: [R] Survey

2014-04-02 Thread Thomas Lumley
On Thu, Apr 3, 2014 at 2:37 AM, Leandro Marino < leandromar...@leandromarino.com.br> wrote: > Dear R-Users, > > I was using survey for the past years and now I am experiencing some > problems with scripts that was working in the past. > > We are working with big data bases so I can't put all varia

[R] Survey

2014-04-02 Thread Leandro Marino
Dear R-Users, I was using survey for the past years and now I am experiencing some problems with scripts that was working in the past. We are working with big data bases so I can't put all variables that I will use in the svydesign. Script working: > data(api) > dclus1<-svydesign(id=apiclus1$d

Re: [R] Survey imputation

2013-06-13 Thread David Winsemius
IS for other tasks. -- David. On Jun 13, 2013, at 10:51 AM, Scott Raynaud wrote: > I paln on using R to do the imputation once I figure out how to do it. > > > - Original Message - > From: Bert Gunter > To: Scott Raynaud > Cc: "r-help@r-project.org"

Re: [R] Survey imputation

2013-06-13 Thread Scott Raynaud
I paln on using R to do the imputation once I figure out how to do it.   - Original Message - From: Bert Gunter To: Scott Raynaud Cc: "r-help@r-project.org" Sent: Thursday, June 13, 2013 12:45 PM Subject: Re: [R] Survey imputation Is this an R question? Seems like it be

Re: [R] Survey imputation

2013-06-13 Thread Ye Lin
look up imputation on survey data might be helpful On Thu, Jun 13, 2013 at 10:45 AM, Bert Gunter wrote: > Is this an R question? > > Seems like it belongs on a statistical or survey list, not r-help. > > Cheers, > Bert > > On Thu, Jun 13, 2013 at 10:37 AM, Scott Raynaud > wrote: > > I'm working

Re: [R] Survey imputation

2013-06-13 Thread Bert Gunter
Is this an R question? Seems like it belongs on a statistical or survey list, not r-help. Cheers, Bert On Thu, Jun 13, 2013 at 10:37 AM, Scott Raynaud wrote: > I'm working with NHIS survye data. I'd like the to use muliple imputation > to cover the missing data for the variables in which I'm i

[R] Survey imputation

2013-06-13 Thread Scott Raynaud
I'm working with NHIS survye data.  I'd like the to use muliple imputation to cover the missing data for the variables in which I'm interested.  My question concerns the use of certain variables in the imputation model.  For example, race would be an important predictor in the imputation model,

[R] Survey package help with svystandardize

2013-01-03 Thread Chris Webb
I am trying to age standardize using the svystandardize package in R. I have successfully managed to hit my SUDAAN based targets for estimates by sex, but not the total. The total is only a little different, but I'd like some help knowing why it isn't exact. I've included the SUDAAN code that gener

Re: [R] survey package question

2012-10-11 Thread Sebastián Daza
Hello Thomas, I use both svymean (with the expanded sample = people), and svyratio (voting unit level), using the same design: design <-svydesign(id=~station + unit, fpc=~probstation+probunits, data=sample, pps="brewer") I got different results using the same sample: svyratio (voting unit)

Re: [R] survey package question

2012-10-11 Thread Thomas Lumley
On Fri, Oct 12, 2012 at 6:56 AM, Sebastián Daza wrote: > Hello, > > I have got a cluster sample using an election dataset where I already > had the final results of a county-specific election. I am trying to > figure out what would be the best sampling design for my data. > > The structure of the

[R] survey package question

2012-10-11 Thread Sebastián Daza
Hello, I have got a cluster sample using an election dataset where I already had the final results of a county-specific election. I am trying to figure out what would be the best sampling design for my data. The structure of the dataset is: 1) polling station (in general schools where people vo

Re: [R] Survey package: using subset option with svyrepdesign

2012-08-09 Thread BrentMast
I found the problem. My data were not in a data.frame. Thanks, Brent -- View this message in context: http://r.789695.n4.nabble.com/Survey-package-using-subset-option-with-svyrepdesign-tp4639802p4639858.html Sent from the R help mailing list archive at Nabble.com.

[R] Survey package: using subset option with svyrepdesign

2012-08-09 Thread BrentMast
Hi. I'm using American Housing Survey (AHS) data with replicate weights. I want subpopulation estimates. When I try to subset the survey design, I get an error message. I don't get the error message when not using the replicate weights (using the regular svydesign function). Any help would be ap

Re: [R] Survey package GLM vs. Linear Mixed Models?

2012-07-25 Thread RNewby
Hi there, haven't heard from anyone and just wondering if anyone had any insight! Thanks. :) -- View this message in context: http://r.789695.n4.nabble.com/Survey-package-GLM-vs-Linear-Mixed-Models-tp4636207p4637797.html Sent from the R help mailing list archive at Nabble.com. _

[R] Survey package GLM vs. Linear Mixed Models?

2012-07-11 Thread RNewby
Hi there, I'm new to some of these more advanced regression techniques and also new to R. This looks like a great forum. I am trying to examine the association with membership in a group and some different variables, most of which are (approximately) normally distributed. Would just do an ANOVA

Re: [R] survey package svystat objects from predict()

2012-02-13 Thread Thomas Lumley
On Tue, Feb 14, 2012 at 11:45 AM, Kieran Healy wrote: > Hello, > > I'm running R 2.14.1 on OS X (x86_64-apple-darwin9.8.0/x86_64 (64-bit)), with > version 3.28 of Thomas Lumley's survey package. I was using predict() from > svyglm(). E.g.: > > data(api) > dstrat<-svydesign(id=~1,strata=~stype, w

[R] survey package svystat objects from predict()

2012-02-13 Thread Kieran Healy
Hello, I'm running R 2.14.1 on OS X (x86_64-apple-darwin9.8.0/x86_64 (64-bit)), with version 3.28 of Thomas Lumley's survey package. I was using predict() from svyglm(). E.g.: data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) out <- svyglm(sch.wide~ell+mobi

[R] Survey data: Quantile Regressions

2011-08-23 Thread Anupam
I searched archives for how to do quantile regressions with complex survey data, and there was nothing that could be helpful to a first time user. I am looking for equivalent of the functions in "quantreg" package. A vignette and/or examples will be very helpful. Is there someone on this list who h

[R] Survey on Statistical Computing Email Lists

2010-11-11 Thread ohri2007
If you have trouble viewing or submitting this form, you can fill it out online: https://spreadsheets.google.com/viewform?formkey=dGczV2J4ai03NXhqZVZKZHR4YWFZSWc6MQ Survey on Statistical Computing Email Lists This is a survey for research purposes. All results would be aggregated and public

[R] Multiple Strata Sampling in R Survey

2010-07-27 Thread Owen Gallagher
But that really doesn't meet the needs of this project. I've also tried it with strata=(~strataOne + strataTwo), but that didn't work either. Does anyone know if its a) possible to do mutiple strata sampling in R survey, and b) how? I emailed the maintainer a week ago, but I still

Re: [R] survey package: weights used in svycoxph()

2010-05-18 Thread Thomas Lumley
On Tue, 18 May 2010, Vinh Nguyen wrote: Binder's estimating equations are the usual way of applying weights to a Cox model, so nothing special is done apart from calling coxph(). To quote the author of the survival package, Terry Therneau, "Other formulae change in the obvious way, eg, the weigh

Re: [R] survey package: weights used in svycoxph()

2010-05-18 Thread Vinh Nguyen
On Tue, May 18, 2010 at 8:50 AM, Thomas Lumley wrote: > >  > I >> >> don't believe so since svycoxph() calls coxph() of the survival >> package and weights are applied once in the estimating equation.  If >> the weights are implemented in the ratio, could you point me to where >> in the code this

Re: [R] survey package: weights used in svycoxph()

2010-05-18 Thread Thomas Lumley
On Mon, 17 May 2010, Vinh Nguyen wrote: Dear R-help, Let me know if I should email r-devel instead of this list. This message is addressed to Professor Lumley or anyone familiar with the survey package. Does svycoxph() implement the method outlined in Binder 1992 as referenced in the help fil

[R] survey package: weights used in svycoxph()

2010-05-17 Thread Vinh Nguyen
Dear R-help, Let me know if I should email r-devel instead of this list. This message is addressed to Professor Lumley or anyone familiar with the survey package. Does svycoxph() implement the method outlined in Binder 1992 as referenced in the help file? That is, are weights incorporated in th

[R] survey package: weights used in svycoxph()

2010-05-17 Thread Vinh Nguyen
Dear R-help, Let me know if I should email r-devel instead of this list.  This message is addressed to Professor Lumley or anyone familiar with the survey package. Does svycoxph() implement the method outlined in Binder 1992 as referenced in the help file?  That is, are weights incorporated in th

Re: [R] survey package question

2010-02-18 Thread Thomas Lumley
On Thu, 18 Feb 2010, Richard Valliant wrote: Should the svyby function be able to work with svyquantile? I get the error below ... It works, but you need to either specify ci=TRUE or keep.var=FALSE. The problem is that svyquantile() by default does not produce standard errors. svyby(~api0

[R] survey package question

2010-02-18 Thread Richard Valliant
Should the svyby function be able to work with svyquantile? I get the error below ... data(api) dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc) svyby(~api00, design=dclus1, by = ~stype, quantiles=c(.25,.5,.75), FUN=svyquantile, na.

Re: [R] Survey Package with Binary Data (no Standard Errors reported)

2009-04-06 Thread Thomas Lumley
On Fri, 3 Apr 2009, Paul Jones wrote: 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

[R] Survey Package with Binary Data (no Standard Errors reported)

2009-04-03 Thread Paul Jones
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 varia

Re: [R] survey statistics, rate/proportions with standard errors

2009-01-08 Thread Stas Kolenikov
On 1/8/09, Robert Wilkins wrote: > what does R have to compare with , say , proc surveymeans, estimate survey > means/proportions with standard errors, using Taylor methods? survey package by Thomas Lumley has pretty much everything you would need. Way more than SAS, at any rate. There are means

[R] survey statistics, rate/proportions with standard errors

2009-01-08 Thread Robert Wilkins
what does R have to compare with , say , proc surveymeans, estimate survey means/proportions with standard errors, using Taylor methods? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

[R] survey package

2008-09-25 Thread Sylvie Ahoussou
Hello I have a problem using the package survey: I'm trying to calculate the prevalence of a disease in animals sampled using a 2 stages sampling system: first level: farm randomly chosen within 551 farms second level: animals randomly chosen in the farms My data base has this aspect:

Re: [R] Survey Design / Rake questions

2008-08-29 Thread Thomas Lumley
quot;Balboa","De Soto",..: 11 2 5 8 6 1 12 7 10 13 ... all(levels(EBSurvey$lineon)==StnName) [1] TRUE # str(EBDesign$NumStn) NULL str(EBSurvey$NumStn) Factor w/ 12 levels "1","2","3","4",..: 10 12 4 12 8 1 8 8 12 4 ... str(ByEBNum$StnTraveld) Factor w/ 12 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8

Re: [R] Survey Design / Rake questions

2008-08-28 Thread Farley, Robert
3 levels "Warner Center",..: 3 1 1 1 2 13 1 5 1 5 ... > str(ByEBOn$StnName) Factor w/ 13 levels "Balboa","De Soto",..: 11 2 5 8 6 1 12 7 10 13 ... > all(levels(EBSurvey$lineon)==StnName) [1] TRUE > # > str(EBDesign$NumStn) NULL > str(EBSurvey$NumStn) Factor w/ 12 levels "1","2","3","4",..: 10 12 4 12 8 1 8 8 12 4 ... > str(ByEBNum$StnTraveld)

Re: [R] Survey Design / Rake questions

2008-08-28 Thread Thomas Lumley
;,"2","3","4",..: 10 12 4 12 8 1 8 8 12 4 ... EBSurvey$NumStn[1:5] [1] 10 12 4 12 8 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 str(ByEBNum$StnTraveld) int [1:12] 1 2 3 4 5 6 7 8 9 10 ... ByEBNum$StnTraveld[1:5] [1] 1 2 3 4 5 *

Re: [R] Survey Design / Rake questions

2008-08-25 Thread Farley, Robert
Survey$NumStn) Factor w/ 12 levels "1","2","3","4",..: 10 12 4 12 8 1 8 8 12 4 ... > EBSurvey$NumStn[1:5] [1] 10 12 4 12 8 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 > str(ByEBNum$StnTraveld) int [1:12] 1 2 3 4 5 6 7 8 9 10 ... > ByEBNum$StnTraveld[1:5]

Re: [R] Survey Design / Rake questions

2008-08-25 Thread Farley, Robert
",..: 10 12 4 12 8 1 8 8 12 4 ... > EBSurvey$NumStn[1:5] [1] 10 12 4 12 8 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 > str(ByEBNum$StnTraveld) int [1:12] 1 2 3 4 5 6 7 8 9 10 ... > ByEBNum$StnTraveld[1:5] [1] 1 2 3 4 5 > *

Re: [R] Survey Design / Rake questions

2008-08-23 Thread Thomas Lumley
Woodman str(EBSurvey$NumStn) Factor w/ 12 levels "1","2","3","4",..: 10 12 4 12 8 1 8 8 12 4 ... EBSurvey$NumStn[1:5] [1] 10 12 4 12 8 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 str(ByEBNum$StnTraveld) Factor w/ 12 levels "1","10","11",..: 1 5 6 7 8 9 10 11 12 2 ... ByEBNum$StnTraveld[1:5] [1] 1 2 3 4 5 Levels: 1 10 11 12 2 3 4 5 6 7 8 9 ***

Re: [R] Survey Design / Rake questions

2008-08-22 Thread Farley, Robert
Canyon North Hollywood Pierce College Reseda Sepulveda Tampa Valley College Van Nuys Warner Center Woodley Woodman > > str(EBSurvey$NumStn) Factor w/ 12 levels "1","2","3","4",..: 10 12 4 12 8 1 8 8 12 4 ... > EBSurvey$NumStn[1:5] [1] 10 12 4 12 8 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 > str(ByEBNum$StnTraveld) Factor w/ 12 levels "1","10","11",.

Re: [R] Survey Design / Rake questions

2008-08-21 Thread Thomas Lumley
prettyR_1.3-2 foreign_0.8-28 #### Robert Farley Metro www.Metro.net -Original Message- From: Farley, Robert Sent: Monday, August 18, 2008 16:18 To: 'r-help@r-project.org' Subject: RE: [R] Survey Design / Rake q

Re: [R] Survey Design / Rake questions

2008-08-20 Thread Farley, Robert
NumStn ) ) Error in model.frame.default(margin, data = design$variables) : invalid type (list) for variable 'ByEBOn' > Robert Farley Metro www.Metro.net -Original Message- From: Stas Kolenikov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 07:13 To: Farley,

Re: [R] Survey Design / Rake questions

2008-08-20 Thread Stas Kolenikov
On Mon, Aug 18, 2008 at 6:18 PM, Farley, Robert <[EMAIL PROTECTED]> wrote: > My motivation is to try to correct for a "time on board" bias we see in > our surveys. Not surprisingly, riders who are only on board a short > time don't attempt/finish our survey forms. We're able to weight our > surve

Re: [R] Survey Design / Rake questions

2008-08-19 Thread Farley, Robert
h_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] graphics grDevices utils datasets stats methods base other attached packages: [1] survey_3.8 fortunes_1.3-5 moonsun_0.1prettyR_1.3-2 foreign_0.8-28 > #

Re: [R] Survey Design / Rake questions

2008-08-18 Thread Farley, Robert
tal flaws" in this concept Robert Farley Metro www.Metro.net -Original Message- From: Stas Kolenikov [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 10:32 To: Farley, Robert Cc: r-help@r-project.org Subject: Re: [R] Survey Design / Rake questions Yo

Re: [R] Survey Design / Rake questions

2008-08-18 Thread Stas Kolenikov
Your reading, in increasing order of difficulty/mathematical details, might be Lohr's "Sampling" (http://www.citeulike.org/user/ctacmo/article/1068825), Korn & Graubard's "Health Surveys" (http://www.citeulike.org/user/ctacmo/article/553280), and Sarndal et. al. Survey Math Bible (http://www.citeul

[R] Survey Design / Rake questions

2008-08-18 Thread Farley, Robert
I'm trying to learn how to calibrate/postStratify/rake survey data in preparation for a large survey effort we're about to embark upon. As a working example, I have results from a small survey of ~650 respondents, ~90 response fields each. I'm trying to learn how to (properly?) apply the aforemen

Re: [R] Survey questions

2008-07-08 Thread Tobias Verbeke
Farley, Robert wrote: I found and loaded the "survey" package. ?rake and ?postStratify seem promising. Are there other packages/procedures I've missed? Are there online references that an R newbie could use to feel comfortable applying these procedures to a survey? How about a reference disc

Re: [R] Survey questions

2008-07-07 Thread Farley, Robert
I found and loaded the "survey" package. ?rake and ?postStratify seem promising. Are there other packages/procedures I've missed? Are there online references that an R newbie could use to feel comfortable applying these procedures to a survey? How about a reference discussing the details of des

[R] Survey questions

2008-06-26 Thread Farley, Robert
First the R question. I have the results of a rather large survey (thousands of forms, each with dozens of questions) with some existing weights and expansion factors. I wish to add additional weighting factors, based on new information that elements of certain variables should appear in certain

[R] Survey: Commercial R companies

2008-06-04 Thread Gregory Warnes
Hello Everyone, In preparation for an upcoming talk, I would like to assemble a list of companies that provide consulting, services, products, or training for R. I am already aware of a number of such companies including (in alphabetical order): BlueReference

Re: [R] survey package: proportion estimate confidence intervals using svymean

2008-02-13 Thread Thomas Lumley
On Tue, 12 Feb 2008, Peter Holck wrote: > Using the survey package I find it is convenient and easy to get estimated > proportions using svymean, and their corresponding estimated standard > errors. But is there any elegant/simple way to calculate corresponding > confidence intervals for those pr

[R] survey package: proportion estimate confidence intervals using svymean

2008-02-13 Thread Peter Holck
Using the survey package I find it is convenient and easy to get estimated proportions using svymean, and their corresponding estimated standard errors. But is there any elegant/simple way to calculate corresponding confidence intervals for those proportions? Of course +/- 1.96 s.e. is a reasonab

Re: [R] survey: estimating a covariance matrix

2008-01-28 Thread Daniel Oberski
Thomas and David, Thanks for your answers. The svyvar() function does the trick. It does not provide a vcov() method for the variance-covariance matrix of these estimates themselves. But I guess I can bootstrap them using library(boot)... Thanks again, daniel On Jan 25, 2008 6:13 PM, Thomas Lu

Re: [R] survey: estimating a covariance matrix

2008-01-25 Thread Thomas Lumley
On Wed, 23 Jan 2008, Daniel Oberski wrote: > Hello > > Does anybody happen to know if it is possible to use the survey package to > estimate a covariance matrix from a complex survey? Yes. svyvar() in the survey package estimates a population covariance matrix. It doesn't give standard errors f

Re: [R] survey: estimating a covariance matrix

2008-01-23 Thread David Winsemius
David Winsemius <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > "Daniel Oberski" <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> Hello >> >> Does anybody happen to know if it is possible to use the survey >> package to estimate a covariance matrix from a complex survey? >>

Re: [R] survey: estimating a covariance matrix

2008-01-23 Thread David Winsemius
"Daniel Oberski" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hello > > Does anybody happen to know if it is possible to use the survey > package to estimate a covariance matrix from a complex survey? > > I have design weights and clusters (no strata), and want to get a > covariance m

[R] survey: estimating a covariance matrix

2008-01-23 Thread Daniel Oberski
Hello Does anybody happen to know if it is possible to use the survey package to estimate a covariance matrix from a complex survey? I have design weights and clusters (no strata), and want to get a covariance matrix with preferably the effective sample size or else an estimate of the variance-co

Re: [R] survey weights in sample with replacement

2007-10-31 Thread Mehtabul Azam
Wednesday, October 31, 2007 9:44 AM To: Azam, Mehtabul Cc: [EMAIL PROTECTED] Subject: Re: [R] survey weights in sample with replacement On Tue, 30 Oct 2007, Azam, Mehtabul wrote: >>> Hi, > I am trying to draw a random sample from an household survey with > sample weight.

Re: [R] survey weights in sample with replacement

2007-10-31 Thread Thomas Lumley
On Tue, 30 Oct 2007, Azam, Mehtabul wrote: >>> Hi, > I am trying to draw a random sample from an household survey with > sample weight. Is there any function in R or Splus which allows this. > It depends on exactly what you want. The sample() function will draw unequal probability sample

Re: [R] survey weights in sample with replacement

2007-10-30 Thread James Reilly
On 31/10/07 4:03 PM, Azam, Mehtabul wrote: >I am trying to draw a random sample from an household survey with > sample weight. Is there any function in R or Splus which allows this. I'm not sure if this what you're after, but R's pps package lets you sample with probability proportiona

[R] survey weights in sample with replacement

2007-10-30 Thread Azam, Mehtabul
>> Hi, I am trying to draw a random sample from an household survey with sample weight. Is there any function in R or Splus which allows this. Regards, *** Mehtabul Azam Department of Economics Southern Methodist University Dallas TX

[R] Survey package question

2007-09-18 Thread eugen pircalabelu
Good afternoon! 1 I have a bit of a problem with the Survey package, but one that is more theoretical than practical. If for example on wishes to use some additional information which comprises of 4 variables with 7, 5,5 and 5 categories (resulting in 875 post-strata if the whole crossin