search for: svyglm

Displaying 20 results from an estimated 69 matches for "svyglm".

2009 Apr 02
1
problem with svyglm()
Hello, I'm trying to use the function svyglm in the library survey. I create a data survey object: data_svy<- svydesign(id=~PSU, strata=~sample_domain, weights=~sample_weight, data=data, nest=TRUE) and I try to use svyglm() with little success: R<-svyglm(data_svy[,4]~(data_svy[,iCol]==listModality[[iVar]] [iMod]),design=data_svy,...
2012 Aug 15
2
sensitivity and specificity in svyglm??
Hello, As obtained from a table svyglm clasificaion, sensitivity and specificity. The funtion ConfusionMatrix () of the library (caret) gives these results but not how to apply it to svyglm. thanks [[alternative HTML version deleted]]
2010 Apr 28
2
Generating a model fitness when score using svyglm?
Does anyone know how to calculated a BIC score (or an equivalent model fitness score) when using svyglm for logistic regressions? Thanks Brad -- View this message in context: http://r.789695.n4.nabble.com/Generating-a-model-fitness-when-score-using-svyglm-tp2069280p2069280.html Sent from the R help mailing list archive at Nabble.com.
2012 Jul 24
3
stepwise in svyglm???
Hello, I want to know how to perform stepwise elimination of variables to svyglm thanks [[alternative HTML version deleted]]
2008 Aug 06
1
Warning when using survey:::svyglm
Howdy, Referencing the below exchange: https://stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning ("non-integer #successes in a binomial glm!") when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) svyglm(sch.wide~meals+acs.core+hsg,dstrat,family="binomial") I get: Stratified Independent Sampling design ... Warning message: In...
2009 Oct 20
2
Weighted Logistic Regressions using svyglm
...good way to run logistic regressions in R when using non-integer weights? I?ve attached the output from the R console of the two different methods I've tried. The first regression is unweighted. The second regression includes the weights in glm. The third regression includes the weights in svyglm. However, despite using the same weights, I get contradicting results. Perhaps I am misunderstanding how to use one or both of these functions. I'd appreciate any help you can provide. Thanks Brad http://www.nabble.com/file/p25969499/Regressions%2Bwith%2BWeights.txt Regressions+with+Weigh...
2012 Aug 02
1
summary(svyglm) Pr (> | t |) ?
...of the model is significant, ie is the p_valor wald test for the model coefficients, for I am interested to know if the three levels of the variable educational level are significant to the model (significance of handling 0.2), I present below the results of my model summary(mod.logis) Call: svyglm(formula = APES_DICOT ~ Nivel_Educativo + Ocupacion_principal + Afiliacion_salud + Tiene_cuidador + Presencia_enfer_cronica + Consumo_tabaco + Consumo_alcohol + Presencia_Dolor + Frec_dolor_cronico + Punt_min_mental + ABC_fis + ABC_instr + Anergia + Actividad_fisica_ultimo_año +...
2012 Nov 23
1
problem with svyglm
I have this problem. test <- svydesign(id=~1,weights=~peso) logit <- svyglm(bach ~ job2 + mujer + egp4 + programa + delay + mdeo + str + evprivate, family=binomial,design=test) then appear: Error in svyglm.survey.design(bach ~ job2 + mujer + egp4 + programa + : all variables must be in design= argument I don't know what this mean... Please help. Pablo. [[alte...
2008 Dec 19
1
svyglm and sandwich estimator of variance
...y case, observations are independent across groups (clusters), but not necessarily within groups. Can I calculate the standard errors with robust variance, in complex sample survey data using R? Outputs: design_tarv<-svydesign(ids=~X2, strata=~X3, data=banco, weights=~X4) banco.glm7 <- svyglm(y ~x1, data = banco, family = poisson (link= "log"), design= design_tarv) summary(banco.glm7) Call: svyglm(y ~ x1, data = banco, family = poisson(link = "log"), design = design_tarv) Survey design: svydesign(ids = ~X2, strata = ~X3, data = banco, weights = ~X4) Co...
2007 Jul 06
0
svyglm
Dear Professor Lumley I am relatively new to using R and also to logistic regression. We have analysed our Dudley Health Survey using the survey package. I am now trying to look at associations using svyglm but I am unsure of how to interpret the output and present the resulting model or whether there are any other things I should do to check the validity of the model. Below is an example of what I have completed so far. All of my factors are numbered 1,2,3 etc instead of 0,1,2,etc - is this a proble...
2012 Dec 10
3
Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
...e data frame are sampling weights. What follows is the result of str() on my data, the series of commands I'm using to fit the model, the responses I'm getting and then some code to reproduce the data and go through the same steps with that code. One last (minor) question. When calling svyglm on the sample data, I actually get some information about the model fitting results as well as the error about non-integer successes. In my real data, you only get the warning. Calling summary(mod1) on the real data does return information about the coefficients and the model fitting. I'm gra...
2009 Oct 09
1
svy / weighted regression
...egression to get the correct point estimates for comparison glm <- glm(deaths ~ country + offset(log(yrs_at_risk)), weights=weight, data=country, family=poisson()) summary(glm) regTermTest(glm, ~ country) # running survey weighted regression svy <- svydesign(~0,,data=country, weight=~weight) svyglm <- svyglm(deaths ~ country + offset(log(yrs_at_risk)), design=svy, data=country, family=poisson()) summary(svyglm) # point estimates are correct, but standard error is way too large regTermTest(svyglm, ~ country) # test indicates no country differences
2017 Jul 05
2
Svyglm Error
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 does not contain 4 elements The following is a minimal reproducible example: library(RCurl) library(survey) data <- getURL("https://raw.githubusercon...
2017 Jul 05
0
Svyglm Error
...3.4.1 splines_3.4.1 lattice_0.20-35 On Wed, Jul 5, 2017 at 2:24 PM, Courtney Benjamin <cbenjami at btboces.org> wrote: > 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 does not contain 4 elements > The following is a minimal reproducible example: > library(RCurl) > library(survey) > > data &...
2007 Aug 17
0
svyglm.predict: cannot allocate vector
Hi, I have a problem with the predict function of svyglm: When I try to predict with an object of svyglm I get the error message that R can't allocate a vector about 3 GB big. Has anybody a hint how I can reduce the memory used for this? I have about 25000 observation and use the weigths parameter. Where is so much data created? Thanks, Werner
2008 Dec 18
1
svyglm fit method?
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 for any insight. Best, Corey...
2012 Feb 12
1
how to extract p values in svyglm
summary(result) Call: svyglm(Injury ~ seat, sD, family = quasibinomial(link = "logit")) Survey design: svydesign(~1, prob = NULL, strata = Data[, 1], weights = Data[, 4], data = Data, fpc = ~fPc) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.256875 0.001421 -2996.7 <2e...
2013 May 02
1
Package survey: singularities in linear regression models
...pecify a linear regression model in which the metric outcome is predicted by two factors and their interaction. glm() computes effects for each factor level and the levels of the interaction. In the case of singularities glm() displays "NA" for the corresponding coefficients. However, svyglm() aborts with an error message. Is there a possibility that svyglm() provides output for coefficients without singularities like glm()? Thank you very much, Sebastian Weirich -- Sebastian Weirich, Dipl.-Psych. Institut zur Qualit?tsentwicklung im Bildungswesen Humboldt-Universit?t zu Berlin S...
2017 Dec 04
1
svyglm
...omedent2<-ifelse(consdentcat2==2,0,1)table(dent2)?dent2<-as.factor(dent2)str(dent2)reg<-cbind(reg, dent2) #tchange to factor?str(sexo)reg$sexo <- as.factor((reg$sexo)) ################# pns2013design<-svydesign(id=~upa, nest=TRUE, strata = estrato, weight = peso, data = reg) PNS<-svyglm(dent2~sexo,design=pns2013design, method="logistic", data = reg) Error in logistic(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,? :?? unused arguments (x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
2006 Jul 18
1
Survey-weighted ordered logistic regression
Hi, I am trying to fit a model with an ordered response variable (3 levels) and 13 predictor variables. The sample has complex survey design and I've used 'svydesign' command from the survey package to specify the sampling design. After reading the manual of 'svyglm' command, I've found that you can fit a logistic regression (binary response variable) by specifying the family=binomial in svyglm function. However I'm unable to fit an ordered logistic model in 'svyglm function'. Any help with this will be appreciated. Thanks, Debarchana. --...