-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (83 loc) · 31.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scan Write - Up</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<body class="stackedit">
<div class="stackedit__html"><h2 id="associations-of-climate-exposures-with-physical-activity-among-older-adults-with-knee-pain-supplementary-info"><strong>Associations of Climate Exposures with Physical Activity among Older Adults with Knee Pain Supplementary Info</strong></h2>
<p>Dylan Clark<sup>1</sup>, Kushang Patel<sup>1,2</sup><br>
<sup>1</sup>University of Washington Department of Anesthesiology & Pain Medicine<br>
<sup>2</sup>Harborview Injury Prevention and Research Center</p>
<h2 id="abstract">Abstract</h2>
<p>There is still a debate within chronic pain research about the degree to which climate affects the pain severity of knee osteoarthritis (OA). However, there may be a confounding association between climate and individual engagement with physical activity (PA) treatments, which are known to reduce OA pain severity. We sought to identify this association between four daily climate variables and the daily PA in the form of walking activity (step counts) for individuals ≥65 years old with knee OA living in King County as previously collected by the UW Anesthesiology & Pain Medicine’s PACIFIC Study (<span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi></mrow><annotation encoding="application/x-tex">n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.43056em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span></span></span></span></span> = 212) from October 2019 to June 2023. Four daily climate variable measurements– maximum 2-minute Wind Speed (mph), Total Precipitation (in), Average Temperature (F), and AQI– were taken from the NOAA Boeing Field weather station and the US EPA King County AQI monitoring stations over same timeframe as the PACIFIC study period. We asked whether there existed people in the PACIFIC study population whose PA levels have different sensitivities to different weather conditions. A statistical analysis was done to answer this question using linear mixed models (LMMs) in <em>STATA</em>. Our model showed that greater wind speed was associated with decreased walking activity (<span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathnormal" style="margin-right: 0.05278em;">β</span></span></span></span></span> = -31.73, <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">p</span></span></span></span></span> = 0.005). Worse air quality may also be associated with a decreased walking activity (<span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathnormal" style="margin-right: 0.05278em;">β</span></span></span></span></span> = -3.84, <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">p</span></span></span></span></span> = 0.074). There were no associations of air temperature and precipitation with walking activity Moving forward, we hope our analysis of the association between climate and PA levels within the PACIFIC study population can be used as support for new PA treatment plans that are both 1) dependent upon individual exercise preferences and 2) modified to fit a given region’s changing climate.</p>
<h2 id="methods">Methods</h2>
<h3 id="linear-regression">Linear Regression</h3>
<p>Simple linear regression was used to model the relationship between each daily climate exposure and daily step counts in <em>STATA</em>. Then, correlation between each daily climate exposure and daily step count was done in <em>R</em> using Spearman’s rank correlation coefficient <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ρ</mi></mrow><annotation encoding="application/x-tex">\rho</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">ρ</span></span></span></span></span> <a href="https://en.wikipedia.org/wiki/Spearman's_rank_correlation_coefficient">[wiki]</a>. This rank correlation coefficient is a method used to assess the statistical dependence between two continuous variables. Spearman’s rank coefficient was used because it can assess whether <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>X</mi></mrow><annotation encoding="application/x-tex">X</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.07847em;">X</span></span></span></span></span> and <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>Y</mi></mrow><annotation encoding="application/x-tex">Y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.22222em;">Y</span></span></span></span></span> are related by any monotonic function, which is a step beyond a simple linear regression which can only assess linearity between <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>X</mi></mrow><annotation encoding="application/x-tex">X</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.07847em;">X</span></span></span></span></span> and <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>Y</mi></mrow><annotation encoding="application/x-tex">Y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.22222em;">Y</span></span></span></span></span>. Anyways, as my poster shows, there was little correlation between any of the climate exposure variables and step counts which was suprising.</p>
<h3 id="multilevel-linear-mixed-model">Multilevel Linear Mixed Model</h3>
<p>Following a similar method to Yimer <em>et. al</em>, we reasoned that if no association existed on the population level then perhaps there were individual variation within the data (perhaps resulting from differential pain processing) that were not accounted for when using the population-average models from the previous section. A linear mixed model (LMM) model can account for variation across individuals by introducing a “random variable” component into the regression equation which allows for there to be error not just associated with the error term <a href="https://en.wikipedia.org/wiki/Mixed_model">[wiki]</a><a href="https://www.stata.com/bookstore/pdf/xt_xtmixed.pdf">[STATA doc]</a>. Basically, a mixed model contains two types of variables called <em>fixed effects</em> and <em>random effects</em>, with the fixed effects being standard regression coefficients (<span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathnormal" style="margin-right: 0.05278em;">β</span></span></span></span></span>), and the random effects being random variables which can be estimated. The statistics is a bit complicated. The equation we modeled took the following form:</p>
<p><span class="katex--display"><span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>Y</mi><mo>=</mo><mi>X</mi><mi>β</mi><mo>+</mo><mi>Z</mi><mi>μ</mi><mo>+</mo><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">Y = X\beta + Z\mu + \epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.22222em;">Y</span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathnormal" style="margin-right: 0.05278em;">Xβ</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.87777em; vertical-align: -0.19444em;"></span><span class="mord mathnormal" style="margin-right: 0.07153em;">Z</span><span class="mord mathnormal">μ</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.43056em; vertical-align: 0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></span></span></p>
<p>This looks pretty fancy but it is really just a linear equation with this extra “random variable” component. In our model, this is is what each parameter represented (<span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi></mrow><annotation encoding="application/x-tex">n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.43056em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span></span></span></span></span> = number of subjects, <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">p</span></span></span></span></span> = number of fixed effects, <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>l</mi></mrow><annotation encoding="application/x-tex">l</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.01968em;">l</span></span></span></span></span> = number of random effects):</p>
<ul>
<li><span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>Y</mi></mrow><annotation encoding="application/x-tex">Y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.22222em;">Y</span></span></span></span></span> - <strong>Predictor Variable</strong> which is an <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>∗</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">n * 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.46528em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">∗</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.64444em; vertical-align: 0em;"></span><span class="mord">1</span></span></span></span></span> matrix of step counts (<code>totalsteps</code>).</li>
<li><span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>X</mi></mrow><annotation encoding="application/x-tex">X</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.07847em;">X</span></span></span></span></span> - <strong>Fixed Effects Design Matrix</strong> which is usually an <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>∗</mo><mi>p</mi></mrow><annotation encoding="application/x-tex">n * p</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.46528em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">∗</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">p</span></span></span></span></span> matrix where <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi></mrow><annotation encoding="application/x-tex">n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.43056em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span></span></span></span></span> is number of participants and <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">p</span></span></span></span></span> is the number of fixed effects. The fixed effects include:
<ul>
<li>average daily temperature (<code>average_temp</code>)</li>
<li>daily maximum two minute wind-speed (<code>wind_speed</code>)</li>
<li>daily AQI (<code>AQI</code>)</li>
<li>total daily precipitation (<code>precip</code>)</li>
<li>subject age (<code>age</code>)</li>
<li>subject sex (<code>sex</code>)</li>
<li>day of subject’s baseline visit (<code>day_1</code> … <code>day_7</code>). Each baseline visit was 7 days. This made date a categorical variable rather than continuous.</li>
<li>Global Intercept</li>
</ul>
</li>
<li><span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathnormal" style="margin-right: 0.05278em;">β</span></span></span></span></span> - <strong>Fixed Effects Vector</strong> - <em>what we want!</em> This is the <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo>∗</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">p * 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.65972em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">p</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">∗</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.64444em; vertical-align: 0em;"></span><span class="mord">1</span></span></span></span></span> vector of coefficients that represent the associations between our climate and step counts.</li>
<li><span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>Z</mi></mrow><annotation encoding="application/x-tex">Z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.07153em;">Z</span></span></span></span></span> - <strong>Random Effects Design Matrix</strong> - An <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>∗</mo><mi>l</mi></mrow><annotation encoding="application/x-tex">n * l</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.46528em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">∗</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.01968em;">l</span></span></span></span></span> matrix corresponding to <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>μ</mi></mrow><annotation encoding="application/x-tex">\mu</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">μ</span></span></span></span></span>. In this case <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>l</mi><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">l = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord mathnormal" style="margin-right: 0.01968em;">l</span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 0.64444em; vertical-align: 0em;"></span><span class="mord">1</span></span></span></span></span> since we are only considering a random intercept.</li>
<li><span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>μ</mi></mrow><annotation encoding="application/x-tex">\mu</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.625em; vertical-align: -0.19444em;"></span><span class="mord mathnormal">μ</span></span></span></span></span> - <strong>Random Effects Vector</strong> - Randomly sampled variables go into this matrix to account for differences among each <code>subject_id</code></li>
<li><span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.43056em; vertical-align: 0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></span> - <strong>Error Vector</strong> which is assumed to be normally distributed and is <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>∗</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">n * 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.46528em; vertical-align: 0em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right: 0.222222em;"></span><span class="mbin">∗</span><span class="mspace" style="margin-right: 0.222222em;"></span></span><span class="base"><span class="strut" style="height: 0.64444em; vertical-align: 0em;"></span><span class="mord">1</span></span></span></span></span></li>
</ul>
<p>This was modeled with the <em>STATA</em> command:</p>
<pre class=" language-stata"><code class="prism language-stata">xi: xtmixed totalsteps i.day precip wind_speed aqi average_temp age i.sex subject_id:
</code></pre>
<p>The estimate was done using maximum likelihood with 3 iterations.</p>
<h3 id="bayesian-linear-mixed-effects-model">Bayesian Linear Mixed Effects Model</h3>
<p>Towards the end of the internship, I became further interested in the approach of Yimer <em>et al.</em> and decided to try an implement an analogous Bayesian model for my data. This model used the <code>brms</code> package in <em>R</em>:</p>
<pre class=" language-r"><code class="prism language-r"><span class="token comment"># Define the Bayesian multilevel mixed model formula with covariates</span>
formula <span class="token operator"><-</span>brms<span class="token operator">::</span>bf<span class="token punctuation">(</span>totalsteps<span class="token operator">~</span>wind_speed<span class="token operator">+</span>s<span class="token punctuation">(</span>date<span class="token punctuation">,</span>k<span class="token operator">=</span><span class="token number">4</span><span class="token punctuation">)</span><span class="token operator">+</span>
average_temp<span class="token operator">+</span>AQI<span class="token operator">+</span>precip<span class="token operator">+</span>gender<span class="token operator">+</span>age<span class="token operator">+</span>comorbitities<span class="token operator">+</span>
pain_catastrophizing<span class="token operator">+</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>average_temp<span class="token operator">+</span>AQI<span class="token operator">+</span>precip<span class="token operator">+</span>wind_speed<span class="token operator">|</span>subject_id<span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># Specify prior distribution for the model including covariates</span>
prior <span class="token operator"><-</span> prior<span class="token punctuation">(</span>normal<span class="token punctuation">(</span><span class="token number">50</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">,</span> class <span class="token operator">=</span> <span class="token string">"b"</span><span class="token punctuation">,</span> coef <span class="token operator">=</span> <span class="token string">"average_temp"</span><span class="token punctuation">)</span> <span class="token operator">+</span>
prior<span class="token punctuation">(</span>normal<span class="token punctuation">(</span><span class="token number">14</span><span class="token punctuation">,</span> <span class="token number">4.75</span><span class="token punctuation">)</span><span class="token punctuation">,</span> class <span class="token operator">=</span> <span class="token string">"b"</span><span class="token punctuation">,</span> coef <span class="token operator">=</span> <span class="token string">"wind_speed"</span><span class="token punctuation">)</span> <span class="token operator">+</span>
prior<span class="token punctuation">(</span>student_t<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">38</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">)</span><span class="token punctuation">,</span> class <span class="token operator">=</span> <span class="token string">"b"</span><span class="token punctuation">,</span> coef <span class="token operator">=</span> <span class="token string">"AQI"</span><span class="token punctuation">)</span> <span class="token operator">+</span>
prior<span class="token punctuation">(</span>normal<span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">)</span><span class="token punctuation">,</span> class <span class="token operator">=</span> <span class="token string">"b"</span><span class="token punctuation">,</span> coef <span class="token operator">=</span> <span class="token string">"precip"</span><span class="token punctuation">)</span> <span class="token operator">+</span>
prior<span class="token punctuation">(</span>student_t<span class="token punctuation">(</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">,</span> class <span class="token operator">=</span> <span class="token string">"sd"</span><span class="token punctuation">)</span> <span class="token operator">+</span>
prior<span class="token punctuation">(</span>normal<span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">,</span> class <span class="token operator">=</span> <span class="token string">"Intercept"</span><span class="token punctuation">)</span>
<span class="token comment"># Fit the Bayesian multilevel mixed model with covariates using brms()</span>
<span class="token comment">#number of chains should equal the number of cores</span>
<span class="token comment">#changed to 4 chains and 4 cores</span>
model <span class="token operator"><-</span> brms<span class="token operator">::</span>brm<span class="token punctuation">(</span>formula<span class="token punctuation">,</span> data <span class="token operator">=</span> dat<span class="token punctuation">,</span> prior <span class="token operator">=</span> prior<span class="token punctuation">,</span>
chains <span class="token operator">=</span> <span class="token number">4</span><span class="token punctuation">,</span> init<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">,</span>core<span class="token operator">=</span><span class="token number">4</span><span class="token punctuation">,</span> iter <span class="token operator">=</span> <span class="token number">8000</span><span class="token punctuation">,</span> autocor<span class="token operator">=</span><span class="token keyword">NULL</span><span class="token punctuation">,</span>
control <span class="token operator">=</span> list<span class="token punctuation">(</span>adapt_delta <span class="token operator">=</span> <span class="token number">0.85</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># Summary of the model</span>
summary<span class="token punctuation">(</span>model<span class="token punctuation">)</span>
</code></pre>
<p>The initial posterior predictive check is <a href="https://ibb.co/yRJJPpx">[here]</a>. I would like to continue working on this model in the future.</p>
<h2 id="climate-data-access">Climate Data Access</h2>
<p><a href="https://www.ncei.noaa.gov/cdo-web/search?datasetid=GHCND">[NOAA ISD]</a> - NOAA’s Daily Summaries Website. Accessed climate daily data from 10/01/2019 to 07/01/2023 corresponding to SEATTLE BOEING FIELD (USW0002434)</p>
<p><a href="https://www.epa.gov/outdoor-air-quality-data/air-quality-index-daily-values-report">[US EPA Daily AQI]</a> - Selected <code>pm_2.5</code> option and county-wide (King County) daily summary for years 2019 to 2023. The 5 <code>.csv</code> files were then appended in STATA.</p>
<h2 id="works-cited">Works Cited</h2>
<ol>
<li>Zhang Y, Jordan JM. Epidemiology of Osteoarthritis. Clinics in Geriatric Medicine. 2010;26(3):355-369. doi:<a href="https://doi.org/10.1016/j.cger.2010.03.001">10.1016/j.cger.2010.03.001</a></li>
<li>Raposo F, Ramos M, Lúcia Cruz A. Effects of exercise on knee osteoarthritis: A systematic review. Musculoskeletal Care. 2021;19(4):399-435. doi:<a href="https://doi.org/10.1002/msc.1538">10.1002/msc.1538</a></li>
<li>Fransen M, McConnell S, Harmer AR, Van Der Esch M, Simic M, Bennell KL. Exercise for osteoarthritis of the knee. Cochrane Musculoskeletal Group, ed. Cochrane Database of Systematic Reviews. 2015;2015(1). doi:<a href="https://doi.org/10.1002/14651858.CD004376.pub3">10.1002/14651858.CD004376.pub3</a></li>
<li>Yimer BB, Schultz DM, Beukenhorst AL, et al. Heterogeneity in the association between weather and pain severity among patients with chronic pain: a Bayesian multilevel regression analysis. PR9. 2022;7(1):e963. doi:<a href="https://doi.org/10.1097/PR9.0000000000000963">10.1097/PR9.0000000000000963</a></li>
<li>Ferreira ML, Zhang Y, Metcalf B, et al. The influence of weather on the risk of pain exacerbation in patients with knee osteoarthritis - a case-crossover study. Osteoarthritis Cartilage. 2016;24(12):2042-2047. doi:<a href="https://doi.org/10.1016/j.joca.2016.07.016">10.1016/j.joca.2016.07.016</a></li>
<li>Ed Hawkins. #ShowYourStripes - Washington Climate 1895-2022.; 2023. <a href="https://tinyurl.com/waclimgraph">https://tinyurl.com/waclimgraph</a></li>
</ol>
</div>
</body>
</html>