survey

Structure for MVC4 Survey Web App

允我心安 提交于 2019-12-12 05:14:26
问题 I am trying to figure out the model structure for a survey app, using the MVC architecture. Actually it is a Q&A section within a larger WebApp. I have about 120 questions and they will all have set options for answers, no written answers. Currently I have 3 tables: Question(id, QuestionText) Answer(id, Userid, Questionid, AnswerOptionId) AnswerOption(id, Option) - example: Yes, No, 1-10, etc I am trying to figure out how to build my viewmodel and view. I can't just have something like: @Html

R Frequency table for multiselect survey question across several columns

倾然丶 夕夏残阳落幕 提交于 2019-12-11 07:46:08
问题 I want to do a fairly common analysis of survey questions in R, but am stuck in the middle. Imagine a survey where you are asked to answer which brands do you associate with certain features (e.g. "brands" could be PlayStation, XBox..., and features could be "speed", "graphics"... where each brand can be checked on several features aka mulit-select). E.g. sth. like this here: https://www.harvestyourdata.com/fileadmin/images/question-type-screenshots/Grid-multi-select.jpg You often refer to

How can I grab and store multiple $_POST Variables in a for each loop?

有些话、适合烂在心里 提交于 2019-12-11 07:12:48
问题 So currently I am using a 3rd party software application to get results from various surveys. This application is sending the results to a page via a $_POST variable. So for example.. $demoEMP = $_POST['demoEMP']; This just stores the answer from the specific question into a variable. What I want to do is store Questions 1-20 in POST variables and Insert them into a database.. What I don't want to do is write 20+ Insert commands or 20+ $var = $_POST['var'] So I was thinking a for loop would

Using predict with svyglm

对着背影说爱祢 提交于 2019-12-10 20:38:35
问题 I have found some odd behavior with predict and the svyglm object from the survey package. If your newdata in predict has a factor/character with one level it spits out error: Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels This error makes sense if I was putting a one level variable as the predictor for a model, but for newdata I don't see the problem. With regular glm this works fine. MRE: library(survey)

is it possible to get the R survey package's `svyby` function multicore= parameter working on windows?

痞子三分冷 提交于 2019-12-10 18:06:36
问题 being able to multithread on windows would be awesome, but perhaps this problem is harder than i had thought.. :( inside of survey:::svyby.default there is a a block that's either lapply or mclapply depending on multicore=TRUE and your operating system. windows users get forced into the lapply loop no matter what, and i was wondering if there's any way to go down the mclapply path instead.. speeding up the computation. i don't know too much about the innards of parallel processing, but i did

How to extract attributes values from svyciprop object?

好久不见. 提交于 2019-12-10 17:29:45
问题 How can I extract attributes from svyciprop object below to a data.frame: library(survey) api <- read.dta(file = "http://www.ats.ucla.edu/stat/stata/library/apipop.dta") data(api) dclus1 <- svydesign(id=~dnum, fpc=~fpc, data=apiclus1) prop.ci <- svyciprop(~I(ell==0), dclus1, method="li") printing prop.ci Yields: > prop.ci 2.5% 97.5% I(ell == 0) 0.021858 0.000664 0.11 str(prop.ci) > str(prop.ci) Class 'svyciprop' atomic [1:1] 0.0219 ..- attr(*, "var")= num [1, 1] 0.000512 .. ..- attr(*,

Combining lapply, svyby, svyratio to calculate many ratios with confidence intervals

怎甘沉沦 提交于 2019-12-10 16:47:26
问题 I am using the survey package in R to work with the U.S. Census' PUMS dataset for population. I've created a Boolean for each broad industry and a character variable MigrationStatus with three values ( Stayed , Left , Entered ). I'd like to examine the ratios of workers in each industry by migration status. This works fine: AGR_ratio=svyby(~JobAGR, by=~MigrationStatus, denominator=~EmployedAtWork, design=subset(pums_design,EmployedAtWork==1), svyratio, vartype='ci') But this produces an error

What is the best Drupal Survey module [closed]

 ̄綄美尐妖づ 提交于 2019-12-09 18:03:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . We're after a replacement for a DotNetNuke installation with a DynamicForms module by DataSprings. Currently the problems are mainly performance related, but the fact that DynamicForms uses Postbacks on ASP.Net all the time renders it also highly susceptible to slow server response time. We're after a Drupal

confidence intervals of svyby proportion

假装没事ソ 提交于 2019-12-08 15:52:08
问题 Is there an existing function that creates confidence intervals from a svyby object for proportions (in my case a crosstab for a binary item in the survey package). I often compare proportions across groups, and it would be very handy to have a function that can extract confidence intervals (with the survey function svyciprop rather than confint ). The example below shows what I'd like to achieve. Load data library(survey) library(weights) data(api) apiclus1$both<-dummify(apiclus1$both)[,1]

Error with svydesign using imputed data sets

ぃ、小莉子 提交于 2019-12-08 09:56:39
问题 I am analyzing an imputed dataset using svydesign but I am getting an error. Below is the code: library(mitools) library(survey) data(nhanes) nhanes$hyp <- as.factor(nhanes$hyp) imp <- mice(nhanes,method=c("polyreg","pmm","logreg","pmm"), seed = 23109) des<-svydesign(id=~1, strat=~age, data=imputationList(imp)) Error in as.data.frame.default(data, optional = TRUE) : cannot coerce class ""call"" to a data.frame I am following the tutorial from this page: http://r-survey.r-forge.r-project.org