[R] svyglm: p-values and confidence intervals contradictory

2020-10-07 Thread Ehsan Karim
Dear list: I am getting p-values and confidence intervals contradictory in svyglm() output from the survey package. Here is a reproducible example: https://ehsanx.github.io/SurveyDataAnalysis/#114_Regression_analysis This problem can be easily fixed by setting appropriate df.resid in the summary

Re: [R] svyglm

2017-12-09 Thread Anthony Damico
hi, could you create a reproducible example starting from http://asdfree.com/pesquisa-nacional-de-saude-pns.html ? thanks On Mon, Dec 4, 2017 at 9:56 AM, Luciane Maria Pilotto via R-help < r-help@r-project.org> wrote: > Hi, > I am trying to run analyzes incorporating sample weight, strata and >

[R] svyglm

2017-12-04 Thread Luciane Maria Pilotto via R-help
Hi, I am trying to run analyzes incorporating sample weight, strata and cluster (three-stage sample) with PNS data (national health survey) and is giving error. I describe below the commands used. I could not make the code reproducible properly. Thanks, ##

Re: [R] Svyglm Error

2017-07-05 Thread Courtney Benjamin
roject.org Subject: Re: [R] Svyglm Error hi, i am not hitting an error when i copy and paste your code into a fresh console. maybe compare your sessionInfo() to mine? > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Serve

Re: [R] Svyglm Error

2017-07-05 Thread Anthony Damico
hi, i am not hitting an error when i copy and paste your code into a fresh console. maybe compare your sessionInfo() to mine? > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack

[R] Svyglm Error

2017-07-05 Thread Courtney Benjamin
Greetings, I am revisiting code from several different files I have saved from the past and all used to run flawlessly; now when I run any of the svyglm related functions, I am coming up with an error: Error in model.frame.default(formula = F3ATTAINB ~ F1PARED, data = data, : the ... list do

[R] svyglm in the survey package: large regression models with replicate weights give infinite standard errors

2016-11-02 Thread Adam C Sales
I'm running some regressions on data from the American Community Survey, with replicate weights for variance estimation, using the svyglm function from the survey package. For my larger regressions, all of the standard errors were reported as Inf. I did a bit of digging through the code, and figu

Re: [R] Svyglm Error in Survey Package

2016-09-25 Thread Courtney Benjamin
set > = pcttest > 90))) > --- snip--- > > The last two commands produce the same results. > > I hope this helps, > John > > - > John Fox, Professor > McMaster University > Hamilton, Ontario > Canada

Re: [R] Svyglm Error in Survey Package

2016-09-25 Thread Fox, John
t; > The last two commands produce the same results. > > I hope this helps, > John > > - > John Fox, Professor > McMaster University > Hamilton, Ontario > Canada L8S 4M4 > Web: socserv.mcmaster.ca/jfox > > > > > -Ori

Re: [R] Svyglm Error in Survey Package

2016-09-24 Thread Fox, John
McMaster University Hamilton, Ontario Canada L8S 4M4 Web: socserv.mcmaster.ca/jfox > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Courtney > Benjamin > Sent: September 23, 2016 11:01 PM > To: r-help@r-project.org > Subj

Re: [R] Svyglm Error in Survey Package

2016-09-23 Thread Anthony Damico
hi could you make this a minimal reproducible example? On Sep 24, 2016 12:03 PM, "Courtney Benjamin" wrote: > In attempting to use the svyglm call in the R Survey Package, I am > receiving the error: Error in pwt[i] : invalid subscript type 'list' > > I have not been able to find a lot of inform

[R] Svyglm Error in Survey Package

2016-09-23 Thread Courtney Benjamin
In attempting to use the svyglm call in the R Survey Package, I am receiving the error: Error in pwt[i] : invalid subscript type 'list' I have not been able to find a lot of information on how to resolve the error; one source advised it was related to how the subsetting command was executed. Th

Re: [R] svyglm error message

2014-02-11 Thread Jeff Newmiller
This is probably a case of incorrect import format conversion... You may be looking at the visual representation of the data within R but not the structure of the data within R. Use the str function to find out more about your data as R understands it... if you actually have empty strings mixed

Re: [R] svyglm error message

2014-02-11 Thread Claire Wladis
Yes, when I say that the cells are blank in the data frames I do mean that the contents of the cells are blank characters "". I have put in a lot of time trying to understand R, but I have no formal programming background, so I do not necessarily always know the correct terminology for something, a

Re: [R] svyglm error message

2014-02-11 Thread Bert Gunter
Disclaimer: I have not followed this thread and claim no statistical expertise. I just wanted to point out a couple of misconceptions that may be relevant. Inline below. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not know

Re: [R] svyglm error message

2014-02-11 Thread Claire Wladis
Thanks for your reply, Thomas. Yes, this is NCES data. There are no negative or missing weights. I am not a programmer and so I'm afraid I don't understand what you mean by not being able to have blank cells in a data.frame object - What I mean specifically is that in the csv file which I impor

Re: [R] svyglm error message

2014-02-11 Thread Thomas Lumley
This is some sort of NCES data, right? I can't see any way to get that particular error (which happens inside glm.fit()) for a logistic model. Are there any negative or missing weights? What do you mean 'represented by blank cells' -- you can't have blank cells in a data.frame object? What d

[R] svyglm error message

2014-02-10 Thread Claire Wladis
Hello, I am using the survey package for the first time to analyze a dataset that has both weights and 200 BRR replication weights. When I try to run svyglm on the output from svrepdesign, I get an error message that I do not know how to interpret, and an extended period of time searching for this

Re: [R] svyglm AIC: NA??????'

2012-07-25 Thread Marc Schwartz
On Jul 25, 2012, at 4:35 PM, Diana Marcela Martinez Ruiz wrote: > > > hello > I want to know why when I use the function "svyglm" for a logistic regression > I get the AIC: NA. The code and the result is mestran below: > > mod2<-svyglm(APES_DICOT~Nivel_Educativo+Ocupacion_principal+Afiliaci

[R] svyglm AIC: NA??????'

2012-07-25 Thread Diana Marcela Martinez Ruiz
hello I want to know why when I use the function "svyglm" for a logistic regression I get the AIC: NA. The code and the result is mestran below: mod2<-svyglm(APES_DICOT~Nivel_Educativo+Ocupacion_principal+Afiliacion_salud+Tiene_cuidador+Presencia_enfer_cronica+ Consumo_tabaco+Consumo_alcohol+

Re: [R] svyglm question (haps)

2012-06-29 Thread Pablo Domínguez Vaselli
It seems the var names you've put are not the same as in the design object: "all variables must be in design= argument ": that means the object you've assigned in mydesign <- svydesign(ids=~vill_neigh_code+clust, strata=~strat, weights=~sweight, data=mydata) Check the spelling. Note that the "myd

[R] svyglm question

2012-06-29 Thread haps
I formed a survey design as: > library(survey) > mydesign <- svydesign(ids=~vill_neigh_code+clust, strata=~strat, > weights=~sweight, data=mydata) where strat: stratum (urban or (sub-county) rural). clust: batch of interviews that were part of the same random walk vill_neigh_code: village or

[R] svyglm and R-squared (survey package)

2010-10-22 Thread Chirag Patel
Hello, This question is relevant for users of the survey package and the function 'svyglm'. I am fitting a model using a normal link (linear regression) and would like to compute the R-squared. How can I retrieve or compute this from the data structure returned from svyglm? Thank you, Chirag

Re: [R] svyglm and sandwich estimator of variance

2008-12-22 Thread Thomas Lumley
On Fri, 19 Dec 2008, Roberta Pereira Niquini wrote: Hi, I would like to estimate coefficients using poisson regression and then get standard errors that are adjusted for heteroskedasticity, using a complex sample survey data. Then I will calculate prevalence ratio and confidence intervals. Can

[R] svyglm and sandwich estimator of variance

2008-12-19 Thread Roberta Pereira Niquini
Hi, I would like to estimate coefficients using poisson regression and then get standard errors that are adjusted for heteroskedasticity, using a complex sample survey data. Then I will calculate prevalence ratio and confidence intervals. Can sandwich estimator of variance be used when observa

Re: [R] svyglm fit method?

2008-12-18 Thread Thomas Lumley
On Thu, 18 Dec 2008, Corey Sparks wrote: Dear list, I am using svyglm in the survey library to fit a binomial logistic regression accounting for sample design. The documentation says the models are not fit by maximum likelihood, so my question is what is the fitting method? Pseudo likelihoo

[R] svyglm fit method?

2008-12-18 Thread Corey Sparks
Dear list, I am using svyglm in the survey library to fit a binomial logistic regression accounting for sample design. The documentation says the models are not fit by maximum likelihood, so my question is what is the fitting method? Pseudo likelihood? Generalized least squares? Thanks