Questions tagged [dummy-data]

Placeholder used for operational or testing purposes.

Dummy-data is useless information reserving a operational information is normally present.

Dummy-data may also be used in testing to properly initialize values which are not intended to be evaluated by the test.

http://en.wikipedia.org/wiki/Dummy_data

164 questions
1
vote
1 answer

Unexpected output in converting numeric variable to a dummy variable in data frame - R

I have this numerical variable in a data frame in R: > head(sdbone$ncorrectas) [1] 29 14 21 12 17 6 Then, I try to convert it to a dummy variable based on the condition that if ncorrectas > 10 it should have the value 1, otherwise 0: I tried the…
CreamStat
  • 2,155
  • 6
  • 27
  • 43
1
vote
1 answer

ggplot plot only the 1 on same graph remove 0 for a MQC

Suppose I have 1 question with 8 choices. A respondent can select minimum 1 choice and maximum 2 choices. I have coded a dummy for each choice. Now it's easy to use ggplot to plot 8 graph where each graph containing yes and no barplot. However my…
S12000
  • 3,345
  • 12
  • 35
  • 51
1
vote
1 answer

Stata - Generate a dummy variable if any string variable of a list begins with specific characters

I am trying to create dummy variables in Stata that are 1 if any of the variables dx1 through dx25 start with a specific string. I know that I can do this using something like the following but for all 25 dx variables: gen dummy=0 replace dummy=1 if…
Noah Hammarlund
  • 103
  • 1
  • 10
1
vote
1 answer

Lasso, glmnet, preprocessing of the data

Im trying to use the glmnet package to fit a lasso (L1 penalty) on a model with a binary outcome (a logit). My predictors are all binary (they're 1/0 not ordered, ~4000) except for one continuous variable. I need to convert the predictors into a…
user2592729
  • 429
  • 5
  • 16
1
vote
3 answers

Calculating year dummy variables using a for loop (foreach) in Stata

I am attempting to generate a dummy variable for each year from 1996 to 2012 (inclusive) such that the 1996 dummy should equal 1 if it is 1996 and 0 if else using the foreach command in Stata to cut down on time (at least for future projects). What…
Martin
  • 51
  • 1
  • 3
  • 7
1
vote
0 answers

Creating a skewed dummy dataset

In order to test out some strategies for removing outliers from laboratory data I want to create a dummy dataset that is a combination of a normal curve and a skewed normal curve. This is to replicate the situation where my data is a combination of…
Lee_Kennedy
  • 207
  • 1
  • 2
  • 12
1
vote
1 answer

Recoding race variable with 9 categories to dummy

Allow me to preface this by saying that I am new to R. I cleaned some income and rent variables and now I am trying to recode my race variable from 9 categories to 2. The original variable is coded as follows: 1=White 2=Black 3=Native 4=Asian 5=A…
monarque13
  • 568
  • 3
  • 6
  • 27
1
vote
1 answer

NAs in the dummies package

I am using R dummy.data.frame function in the dummies package to create dummy variables for the k levels of my factor. Unfortunately, my factor has NAs. When I use dummy.data.frame it creates k dummies with no NAs and a new dummy which flags with 1…
MIeva
  • 35
  • 4
1
vote
1 answer

Statistics Dummy Variable as Dependent Variable Regression

I have a bunch of independent variables: height, weight, etc that I want to regress a dummy variable on to. For instance, if I wanted to regress diabetes (0 if patient doesnt have diabetes, 1 if patient does have diabetes) and I wanted to figure out…
Pcarlitz
  • 223
  • 1
  • 5
  • 17
1
vote
0 answers

Writing dummy data to the selected file of external storage android

In the below mentioned code I am writing dummy data to all files present in external storage and renaming to "abc.txt". But what I want is to write dummy data to only that file which I select and rename that particular file. How do I do? File[]…
1
vote
0 answers

How to programmatically create dummy email thread?

For comparing some software I need a thread of mails, i.e. some mails with replies and replies to the replies... Content does not matter, but attachment and richt-text would be nice. I wonder how to create such a dummy mail thread programmatically…
mcbetz
  • 2,329
  • 4
  • 20
  • 30
1
vote
2 answers

R Query: Creating Dummy Variables from a Categorical Variable

Hello Stack Overflow people, I have spent a while searching for a solution to my problem, but not found anything, so thought I would post. Basically I have a dataset of 196 countries listed in alphabetical order. One of the variables assigns a…
1
vote
1 answer

What is an oracle dummy table?

I am now learning Oracle PL*SQL and having some understanding difficulties on dummy table which is called DUAL Table. Can someone explain what that is in a simple way? Please.
Dilshad Abduwali
  • 1,388
  • 7
  • 26
  • 47
1
vote
0 answers

Android Listfragment, switch to real data

Ok, so I started with the android template that uses "dummycontent" to populate the list fragment. Now I have real data (in an sqldatabase) that I need to use, but I cant figure out how to replace dummy content. the oncreate of the fragment looks…
Chris
  • 125
  • 1
  • 3
  • 12
1
vote
3 answers

How to Create a Single Dummy Variable with conditions in multiple columns?

I am trying to efficiently create a binary dummy variables (1/0) in my data set based on whether or not one or more of 7 variables (col9-15) in the data set take on a specific value (35), but I don't want to test all columns. While as.numeric is…
km5041
  • 351
  • 1
  • 4
  • 13