<p>Using <a href="https://CRAN.R-project.org/package=wakefield" rel="nofollow noreferrer">wakefield package</a> it is pretty easy, here is an example from <a href="https://github.com/trinker/wakefield" rel="nofollow noreferrer">GitHub page</a>. This will create 500 dummy variables for id, race, age, etc. :</p>

<pre><code>library(wakefield)

myDummyPheno &lt;- r_data_frame(
  n = 500,
  id,
  race,
  age,
  sex,
  hour,
  iq,
  height,
  died
)

# result
myDummyPheno

# # A tibble: 500 x 8
#    ID    Race        Age Sex    Hour           IQ Height Died 
#   &lt;chr&gt;  &lt;fct&gt;     &lt;int&gt; &lt;fct&gt;  &lt;S3: times&gt; &lt;dbl&gt;  &lt;dbl&gt; &lt;lgl&gt;
#  1 001   Bi-Racial    27 Male   00:00:00     93.0   71.0 F    
#  2 002   White        28 Female 00:00:00    104     64.0 T    
#  3 003   Black        28 Male   00:00:00    111     67.0 T    
#  4 004   Hispanic     35 Male   00:00:00     90.0   67.0 T    
#  5 005   Hispanic     21 Female 00:00:00     94.0   70.0 T    
#  6 006   Black        35 Male   00:00:00     74.0   73.0 F    
#  7 007   Black        27 Male   00:00:00    102     68.0 T    
#  8 008   White        28 Female 00:00:00     95.0   70.0 F    
#  9 009   White        30 Female 00:00:00     80.0   71.0 F    
# 10 010   White        30 Female 00:00:00    114     66.0 T    
</code></pre>

CC BY-SA 3.0
2018-02-20T13:53:24.870Z
Awesome, that is a good pointer!
user2808642
CC BY-SA 3.0
2018-02-19T16:40:12.030Z
2018-02-19T16:40:12.030Z
zx8754
<p>I have whole genome sequence (human) data (SNP data), but don't have phenotype data ready for any traits yet. Hopefully, I will get real phenotype data soon. To run GWAS (genome-wide-association study) or any other analysis, i want to create artificial/dummy data for any trait, let's say human height. Could anyone please recommend what is best option? Does plink generate any dummy phenotype data? or any other programme?  </p>

CC BY-SA 3.0
2018-02-19T11:55:41.890Z
You just need to create some random values (either integer for height, or categorical for "disease" or any other trait you want to "test"). What have you tried so far? Why do you need to create it now? If for learning process you might be able to download some GWAS data (take into considerations that it is identifying information so you might find restrictions to download data).
llrs
<r><plink>
How to create artificial or dummy phenotype data
# How to create artificial or dummy phenotype data

(Asked by: username_0 on 2018-02-19)

I have whole genome sequence (human) data (SNP data), but don't have phenotype data ready for any traits yet. Hopefully, I will get real phenotype data soon. To run GWAS (genome-wide-association study) or any other analysis, i want to create artificial/dummy data for any trait, let's say human height. Could anyone please recommend what is best option? Does plink generate any dummy phenotype data? or any other programme?

**Tags:** r, plink
> **Comments:**
> **username_1**: You just need to create some random values (either integer for height, or categorical for "disease" or any other trait you want to "test"). What have you tried so far? Why do you need to create it now? If for learning process you might be able to download some GWAS data (take into considerations that it is identifying information so you might find restrictions to download data).  

---

## 1 answers

### Answer by username_2 on 2018-02-19. Score: 3

Using wakefield package it is pretty easy, here is an example from GitHub page. This will create 500 dummy variables for id, race, age, etc. :
library(wakefield)

myDummyPheno <- r_data_frame(
  n = 500,
  id,
  race,
  age,
  sex,
  hour,
  iq,
  height,
  died
)

# result
myDummyPheno

# # A tibble: 500 x 8
#    ID    Race        Age Sex    Hour           IQ Height Died 
#                 
#  1 001   Bi-Racial    27 Male   00:00:00     93.0   71.0 F    
#  2 002   White        28 Female 00:00:00    104     64.0 T    
#  3 003   Black        28 Male   00:00:00    111     67.0 T    
#  4 004   Hispanic     35 Male   00:00:00     90.0   67.0 T    
#  5 005   Hispanic     21 Female 00:00:00     94.0   70.0 T    
#  6 006   Black        35 Male   00:00:00     74.0   73.0 F    
#  7 007   Black        27 Male   00:00:00    102     68.0 T    
#  8 008   White        28 Female 00:00:00     95.0   70.0 F    
#  9 009   White        30 Female 00:00:00     80.0   71.0 F    
# 10 010   White        30 Female 00:00:00    114     66.0 T

> **Comments:**
> **username_0**: Awesome, that is a good pointer!  

---

