similar to: repeating categorical variable codes

Displaying 20 results from an estimated 10000 matches similar to: "repeating categorical variable codes"

2012 Sep 25
1
Three Stage Sampling of categorical variable using 'survey' in R
For a sanitation project in Bangladesh I need to design a three stage sample survey to be representative of around 40 million people. I find myself suddenly with several challenges with which I struggle and would be gratefully for any help. As the questions are linked I kept them together rather than creating multiple posts 1) SURVEY DESIGN So far I designed mainly two stage cluster surveys but
2009 Jan 22
2
Converting ddf/dct/sas data definition file to R
Dear all, I was wondering whether anyone knows about a program which converts (part of) a data definition file (such as a .dct file for stata, or .sas file for sas) into an R-script. Here is an example with a .sas file: <-- snipp VALUE HTYPE (default=32) 0 = "Not in household" 1 = "Married couple family household" 2 =
2013 Nov 19
1
Repeated measures with categorical data
Hello, I am working in a longitudinal study, with a categorical variable as a dependent variable (alcohol consumption: no use, use, abuse and dependence) with repeated measures (baseline, 1 year, 2 years). Besides I have another variable with two groups: control and experimental. I would like to analyze the evolution in each group, I have though in lme, but I am not sure if I can do an lme with
2003 Aug 20
1
query on converting survey data from one structure to another
Dear R users, I am trying to convert a dataset from one format to several rectangular datasets. A consultant helped design the data entry program for our survey using Delphi/Pascal and for each household the information is stored in a file called "EA-HM-HH.TXT" where EA is the enumeration area number, HM is the homestead number and HH is the household number. Within this file the
2005 Jul 14
1
Single-table inheritance and eager loading
I have a people table with four types of people: clients, spouses, children, and others all setup using single-table inheritance with a foreign key back to a household record. A Household has_one client and spouse, and has_many children and others. I want to use a single "Household.find(@session [:household_id], :include => [:client, :spouse, :children, :others])"
2020 Oct 27
2
Creating unique code
Hello, I need some help in creating a new variable. I need to create a 'couple identifier', which gives a unique code for every couple/triple/... in a household. So, I can identify couples. To do this, I should use 4 variables: * SERIAL = a unique numeric code for each household * PERNUM = a unique numeric code for each person * SPLOC = the numeric code of the spouse in the
2007 Sep 07
1
R survey package again
Hi R-users!! I have some trouble with the survey pakage and i would be very glad if you can give me an advice. I have a sample from a survey where household were interviewed. The sample has 4 criteria on which the stratification was based: REGION, SIZE OF HOUSEHOLD, SIZE OF LOCALITY, AGE OF HEAD OF HOUSEHOLD. Since i don't have the whole information in each cell of the cross
2002 Nov 14
1
analysis of data with observation weights
Dear R-users, Recently I had to analyze a dataset from household survey. The sample design ensured, that each household in the population has the same probability of being sampled. However the data were gathered from only one adult individual in each household, who was randomly choosen by an interviewer (via "Kish grid"). To equalize the probabilities for each INDIVIDUAL a casewise
2007 Oct 27
1
[non-statistics question]methodological problem
Good afternoon! As mentioned in the subject, my question regards more the methodological part that accompanies survey design and the statistical part that is involved. So, I have the following data: a<-data.frame (id_hh=c(1:5), strata=c(1,1,2,2,1), Nhstrata=c(100,100,200,200,100), Nrmemb=c(2,4,2,5,4)) a$ocmemb1<-c("wk","jl","st","jl","st")
2006 Jun 20
3
Create variables with common values for each group
Dear all, sorry, this is for sure really basic, but I searched a lot in the internet, and just couldn't find a solution. The problem is to create new variables from a data frame which contains both individual and group variables, such as mean age for an household. My data frame: df hhid h.age 1 10010020 23 2 10010020 23 3 10010126 42 4 10010126 60 5 10010142
2011 Oct 04
2
adding a dummy variable...
Hi all, I have a dataset of individuals where the variable ID corresponds to the identification of the household where the individual lives. rel.head stands for the relationship with the household head. so rel.head=1 is the household head, rel.head=2 is the spouse, rel.head=3 is the children. Here is an example to see how it looks like: df<-data.frame(ID=c("17100",
2012 Apr 17
1
random effects using lmer
Hi, I am trying to run a logistic regression to look at the risk of malaria infection in individuals. I want to account for intra household correlation and so want to include a household level random effect. I have been using the lmer command in lme4 package but am getting some strange results that are completely different to those I get using STATA. Can I just check that this is the correct
2006 Nov 06
4
neg-bin clustered analysis in R?
Dear All, I'm analysing a negative binomial dataset from a population-based study. Many covariates were determined on household level, so all members of a household have the same value for those covariates. In STATA, there seems to be an option for 'clustered analysis' for neg-bin regression. Does an equivalent exist for R(MASS)'s glm.nb or a comparable function? Many thanks for
2012 Nov 27
1
Using factor variables with overlapping categories
ear folks ? I have a question, though it is more of a logic- or a good practices-question than a programming question per se. I am working with data from the American Community Survey summary file. It is mainly categorical count data. Currently I am working with about 40 tables covering about 35 variables, mainly in two-way tables, with some 3-way and a handful of four-way tables. I am going to
2012 Apr 03
1
Compare by row and insert previous row value (Or non Time Series Lag)
I have the following sample dataset (CSV input here:http://goo.gl/YR8LP. CSV output here: http://goo.gl/EFCC8) which I want to transform as follows. For each person in a household I want to create two new variables OrigTAZ and DestTAZ. It should take the value in TripendTAZ and put that in DestTAZ. For OrigTAZ it should put value of TripendTAZ from the previous row. For the first trip of every
2012 Aug 02
1
Metafor package: Including multiple (categorical) predictors
Dear Metafor users, I''d like to test a model with 2 continuous and 2 categorical moderators in a meta regression. One categorical parameter has 2 levels and the other has 4 levels. If I understand correctly, when I include all moderators in the model, Metafor returns main effects of the continuous parameters and contrasts of each level of categorical moderators with the intercept (which
2011 Jun 12
2
using categorical variable in multiple regression
Hello, I wanted to do the multiple regression on categorical predictor data there's variable x1,x2,x3 and x3 is categorical one. so i just used as.factor(x3) and then ran multiple regression is it a good way to do the multiple regression on categorical predictor data? and how can I interpret the estimates? also if using as.factor is a good way, is there any difference with doing dummy coding
2003 Oct 15
2
aov and non-categorical variables
It is unclear to me how aov() handles non-categorical variables. I mean it works and produces results that I would expect, but I was under impression that ANOVA is only defined for categorical variables. In addition, help(aov) says that it "call to 'lm' for each stratum", which I presume means that it calls to lm() for every group of the categorical variable, however I
2002 Feb 21
2
Re: Factor analysis of categorical or mixed categorical/continuousdata in
I am looking to fit one or more latent categorical variables to data that is a mixture of categorical and continuous variables. Factor analysis would work for continuous data, latent class analysis for categorical data. I understand that in a package such as MPlus I could perform a single analysis of both data types. Are there similar routines available in R? Stuart -----Original Message-----
2011 Jul 29
1
R, ctree and categorical variables
I am running the ctree function in R. My data has about 10 variables, many of which are categorical. 2 of the categorical variables have many levels (one has 900 levels, another has 1,000 levels). As an example, 1 of these variables is disease code and is structured as A, B, C, ...., AA, AB, AC.... Each time i've tried to run the ctree function, including these 2