In [20]:
using JWAS,JWAS.Datasets,DataFrames,CSV
In [2]:
phenofile = Datasets.dataset("example","phenotypes.txt")
phenotypes = CSV.read(phenofile,delim = ',',header=true,missingstrings=["NA"]);
In [3]:
first(phenotypes,5)
Out[3]:
In [4]:
model_equation1 ="y1 = intercept + x1*x3 + x2 + x3";
In [5]:
model1 = build_model(model_equation1);
In [6]:
set_covariate(model1,"x1");
In [7]:
set_random(model1,"x2");
In [8]:
out1=runMCMC(model1,phenotypes);
In [9]:
keys(out1)
Out[9]:
In [10]:
out1["location parameters"]
Out[10]:
In [11]:
out1["residual variance"]
Out[11]:
In [12]:
model_equation2 ="y1 = intercept + x1 + x3
y2 = intercept + x1 + x2 + x3
y3 = intercept + x1 + x1*x3 + x2";
In [13]:
model2 = build_model(model_equation2);
In [14]:
set_covariate(model2,"x1");
In [15]:
set_random(model2,"x2");
In [16]:
out2=runMCMC(model2,phenotypes,chain_length=5000,output_samples_frequency=100);
In [17]:
keys(out2)
Out[17]:
In [18]:
out2["location parameters"]
Out[18]:
In [19]:
out2["residual variance"]
Out[19]: