#Set the "working directory," or basically the path to all your files
modelSetWD("C:\users\OldLiz\Desktop")

#Check the model
modelCheck("Bayesian_GLM-Model_1.rtf")

#Load data
modelData("stress_data_bugs_format.txt")

#Compile the model with 3 parallel MCMC chains
modelCompile(3)

#Generate random initialization values
modelGenInits()

#Burn-in 1000 chains
modelUpdate(1000)

#Identify the parameters you want to record
samplesSet("intercept")
samplesSet("symptoms.slope")
samplesSet("intercept.prior")
samplesSet("symptoms.slope.prior")
samplesSet("sd")
dicSet()

#Update your model with the remaining 9000 samples
modelUpdate(9000)

#Save the MCMC chains
samplesCoda(intercept, symptoms_intercept_)
samplesCoda(symptoms.slope, symptoms_slope_)
samplesCoda(intercept.prior, symptoms_intercept_prior_)
samplesCoda(symptoms.slope.prior, symptoms_slope_prior_)

#Evaluate the output
samplesStats("*")
samplesDensity("*")
dicStats()