Skip to content

Commit

Permalink
deploy: ea59417
Browse files Browse the repository at this point in the history
  • Loading branch information
spring-haru committed Apr 26, 2024
1 parent 7710837 commit 24e1b4a
Show file tree
Hide file tree
Showing 140 changed files with 228 additions and 225 deletions.
48 changes: 24 additions & 24 deletions 10_Residuals.html
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ <h3>説明<a class="headerlink" href="#id3" title="Link to this heading">#</a></
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>決定係数が高いケース: 0.897
決定係数が高いケース: 0.503
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>決定係数が高いケース: 0.916
決定係数が高いケース: 0.573
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -638,7 +638,7 @@ <h3>散布図と回帰直線<a class="headerlink" href="#id4" title="Link to thi
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/8c6770d7095822a4c57beaa37b75ce52176642bc7f48981b35eedaa1896f6814.png" src="_images/8c6770d7095822a4c57beaa37b75ce52176642bc7f48981b35eedaa1896f6814.png" />
<img alt="_images/5d9a61329744e67a0ec7500fd0f08f59110a3a6392efe2f83d65819620f764fa.png" src="_images/5d9a61329744e67a0ec7500fd0f08f59110a3a6392efe2f83d65819620f764fa.png" />
</div>
</div>
<p>回帰直線のフィット感ははっきりと決定係数の値に現れている。</p>
Expand Down Expand Up @@ -671,7 +671,7 @@ <h3>残差<a class="headerlink" href="#id5" title="Link to this heading">#</a></
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/abd7f0809136447ea8fd136127961bdb236c7186a737301be6558ee6805a70de.png" src="_images/abd7f0809136447ea8fd136127961bdb236c7186a737301be6558ee6805a70de.png" />
<img alt="_images/6839c6145d81304003749e98c5a4c88127bdbd6331010a127694dbfc4f1115f5.png" src="_images/6839c6145d81304003749e98c5a4c88127bdbd6331010a127694dbfc4f1115f5.png" />
</div>
</div>
<p>ここでも決定係数の値との関係がハッキリとわかる。</p>
Expand Down Expand Up @@ -704,7 +704,7 @@ <h3>標準化残差<a class="headerlink" href="#id6" title="Link to this heading
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/5dfa02cd82241804090eb214fc98c6fb554a68366622cbc5b14f8333edbc319c.png" src="_images/5dfa02cd82241804090eb214fc98c6fb554a68366622cbc5b14f8333edbc319c.png" />
<img alt="_images/04b0535cf48506430ba126aaae3183340ee9e7d088df9a14d4f44fc8cf41215e.png" src="_images/04b0535cf48506430ba126aaae3183340ee9e7d088df9a14d4f44fc8cf41215e.png" />
</div>
</div>
<p>左右ともに散らばりの差はあまりない。もちろん,理由は平均<code class="docutils literal notranslate"><span class="pre">0</span></code>,分散<code class="docutils literal notranslate"><span class="pre">1</span></code>になるように「標準化」されているためである。</p>
Expand Down Expand Up @@ -753,7 +753,7 @@ <h2>「理想的な」残差の分布<a class="headerlink" href="#id7" title="Li
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/2206f233d43df96047bdf3e5708f4ed3602bf4fdf631dd7a36ecf964647f4050.png" src="_images/2206f233d43df96047bdf3e5708f4ed3602bf4fdf631dd7a36ecf964647f4050.png" />
<img alt="_images/3ec3f03eca313b45e1e4ac28b0f06419a82fad66feb23f2de471a08738b6939e.png" src="_images/3ec3f03eca313b45e1e4ac28b0f06419a82fad66feb23f2de471a08738b6939e.png" />
</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">0</span></code>の周りに均等に分散しているのが確認できる。</p>
Expand All @@ -766,7 +766,7 @@ <h2>「理想的な」残差の分布<a class="headerlink" href="#id7" title="Li
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/6c66fcd166292db8e452effac16c637159cae51fa3f0f5c671b604be5bcddcb4.png" src="_images/6c66fcd166292db8e452effac16c637159cae51fa3f0f5c671b604be5bcddcb4.png" />
<img alt="_images/94e5342a691a533d60d93e248fe3bc73b011a2bb514fd59ecc4890d3ce72e06f.png" src="_images/94e5342a691a533d60d93e248fe3bc73b011a2bb514fd59ecc4890d3ce72e06f.png" />
</div>
</div>
<p>観測値の間隔は少し広がっているが,シミュレーションによっては<span class="math notranslate nohighlight">\(n=2000\)</span>と比べて大きな変化は見られない場合もあれば,「外れ値」が気になる場合もあるかも知れない。</p>
Expand All @@ -779,7 +779,7 @@ <h2>「理想的な」残差の分布<a class="headerlink" href="#id7" title="Li
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/36b588cf00331758eb035d9c509197fc4f0f2bd2057ddb92f8bd923d9fb5675a.png" src="_images/36b588cf00331758eb035d9c509197fc4f0f2bd2057ddb92f8bd923d9fb5675a.png" />
<img alt="_images/750744c3aff1e1e9c9c2986c7cf519418d4e053501e0bd49cfaab77834752fc4.png" src="_images/750744c3aff1e1e9c9c2986c7cf519418d4e053501e0bd49cfaab77834752fc4.png" />
</div>
</div>
<p>さらに隙間が広くなっている。シミュレーションによっては,少し偏りがあるように見える場合も発生するため,上の例と比べると,GM仮定1,4,5に関して自信を持って判断しづらくなる。</p>
Expand All @@ -792,7 +792,7 @@ <h2>「理想的な」残差の分布<a class="headerlink" href="#id7" title="Li
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/3fb3edec2c370b5404dd213e7a99cf5a1cf350ec9ecaab5ac766497a74f0a60d.png" src="_images/3fb3edec2c370b5404dd213e7a99cf5a1cf350ec9ecaab5ac766497a74f0a60d.png" />
<img alt="_images/ef988a027c4686c408f09780dbc78f9f538afcb4660dc7f9987e0307f1a9af93.png" src="_images/ef988a027c4686c408f09780dbc78f9f538afcb4660dc7f9987e0307f1a9af93.png" />
</div>
</div>
<p>正規分布と分かって眺めるとそう見えるかも知れないが,実際の実証分析を行う上でこの図だけでGM仮定1,4,5が満たされているかどうかを判断するのは難しい。</p>
Expand All @@ -805,7 +805,7 @@ <h2>「理想的な」残差の分布<a class="headerlink" href="#id7" title="Li
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/ec4f4d50cd0c997098dfa7ca95e35c189d991140714af9ecec7731a27a7b3197.png" src="_images/ec4f4d50cd0c997098dfa7ca95e35c189d991140714af9ecec7731a27a7b3197.png" />
<img alt="_images/a566b98b5773d36633eddb0c70a2fe1fb5d0c58dd75631d13c635b74fecb268b.png" src="_images/a566b98b5773d36633eddb0c70a2fe1fb5d0c58dd75631d13c635b74fecb268b.png" />
</div>
</div>
<p>標本の大きさが小さい場合,観測数が<code class="docutils literal notranslate"><span class="pre">10</span></code>少なくなると図が大きく違うように見える。</p>
Expand Down Expand Up @@ -857,7 +857,7 @@ <h3><code class="docutils literal notranslate"><span class="pre">resid_fit()</sp
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/5a99d378409a2f606bfbe03877588925d9725dc42c3d940d06ee750cfb807742.png" src="_images/5a99d378409a2f606bfbe03877588925d9725dc42c3d940d06ee750cfb807742.png" />
<img alt="_images/fbdb1c89a04138e1f8363ff7c2efbe8171193fe8cfdf8643caf87a27432c2cf9.png" src="_images/fbdb1c89a04138e1f8363ff7c2efbe8171193fe8cfdf8643caf87a27432c2cf9.png" />
</div>
</div>
<p>回帰分析結果の「健康状態」を診断する上でこの図は最もよく使われる。この図について以下の点を覚えておこう。</p>
Expand Down Expand Up @@ -893,7 +893,7 @@ <h3><code class="docutils literal notranslate"><span class="pre">q_q()</span></c
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/b1a94b37c44712dd7f58dff886168328c7449b374382ea1578a2af0cd055a621.png" src="_images/b1a94b37c44712dd7f58dff886168328c7449b374382ea1578a2af0cd055a621.png" />
<img alt="_images/2cca4410f188f96c06cd74f0f32082d7c3030a63b39e51860c2ce66101374142.png" src="_images/2cca4410f188f96c06cd74f0f32082d7c3030a63b39e51860c2ce66101374142.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -925,7 +925,7 @@ <h3><code class="docutils literal notranslate"><span class="pre">scale_loc()</sp
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/79c4e24475f9bcd1efae791493e9f6228c0837e9b6ea7933778f3d0dd9d642a4.png" src="_images/79c4e24475f9bcd1efae791493e9f6228c0837e9b6ea7933778f3d0dd9d642a4.png" />
<img alt="_images/12483f85c0b7bce6d0d6590993ab6ec7aca11af6dcfac4bc206aa8f1c201543d.png" src="_images/12483f85c0b7bce6d0d6590993ab6ec7aca11af6dcfac4bc206aa8f1c201543d.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -984,7 +984,7 @@ <h3><code class="docutils literal notranslate"><span class="pre">resid_lev()</sp
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/c7ac5124b6952ad74475f9d20dfb20362f9875d569cc79c3b52d4281ba2b8754.png" src="_images/c7ac5124b6952ad74475f9d20dfb20362f9875d569cc79c3b52d4281ba2b8754.png" />
<img alt="_images/d97782afce474f0956daf61ad604fc7fcd1180e95ca2d2646299ae141757a776.png" src="_images/d97782afce474f0956daf61ad604fc7fcd1180e95ca2d2646299ae141757a776.png" />
</div>
</div>
</section>
Expand All @@ -999,7 +999,7 @@ <h3><code class="docutils literal notranslate"><span class="pre">plot()</span></
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/dd509db883bdb535d58c506effa221781dab89beb8844de69e2edcd60385e613.png" src="_images/dd509db883bdb535d58c506effa221781dab89beb8844de69e2edcd60385e613.png" />
<img alt="_images/41003f3f915aedda0037ce74b9c9239e8cf4d2452998a9a5189cd2d25006151c.png" src="_images/41003f3f915aedda0037ce74b9c9239e8cf4d2452998a9a5189cd2d25006151c.png" />
</div>
</div>
</section>
Expand All @@ -1025,7 +1025,7 @@ <h2><code class="docutils literal notranslate"><span class="pre">qq</span></code
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/889883ca911f20d89cda6533dc3cc27aae804cc550f9d9020c2ea267652bf2fe.png" src="_images/889883ca911f20d89cda6533dc3cc27aae804cc550f9d9020c2ea267652bf2fe.png" />
<img alt="_images/fe3e5e90eaab242090ce3907ed8009675290f14afdad761a2889472ac6a5e784.png" src="_images/fe3e5e90eaab242090ce3907ed8009675290f14afdad761a2889472ac6a5e784.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -1068,7 +1068,7 @@ <h3>ケース1:被説明変数の変換が必要な回帰式<a class="header
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/fca7950b90a1463ba5da889cb89a9817a86be84c03329cbd100583643359d1c3.png" src="_images/fca7950b90a1463ba5da889cb89a9817a86be84c03329cbd100583643359d1c3.png" />
<img alt="_images/d7d2aea8d367e961e527a654d8378b6fcc395917eac7aaf419af03cc48d46714.png" src="_images/d7d2aea8d367e961e527a654d8378b6fcc395917eac7aaf419af03cc48d46714.png" />
</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">lmdiag</span></code>パッケージを使う。</p>
Expand All @@ -1081,7 +1081,7 @@ <h3>ケース1:被説明変数の変換が必要な回帰式<a class="header
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/4f450169a90919e80d734dbb25c2c9424e052222d5f1953159f1d8d71d5f93dd.png" src="_images/4f450169a90919e80d734dbb25c2c9424e052222d5f1953159f1d8d71d5f93dd.png" />
<img alt="_images/ec1a6ddeca5c531bae2ea15a471bae7664c9b717c577b133269ba28fea3dd4bc.png" src="_images/ec1a6ddeca5c531bae2ea15a471bae7664c9b717c577b133269ba28fea3dd4bc.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -1121,7 +1121,7 @@ <h3>ケース2:説明変数の2乗項の欠落<a class="headerlink" href="
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/539dfcc42dd0af1a83d79304ac1ff1bc0834fc4a6002b5797fe4216198ad473c.png" src="_images/539dfcc42dd0af1a83d79304ac1ff1bc0834fc4a6002b5797fe4216198ad473c.png" />
<img alt="_images/4a5574bad646440c723988338f6efd6af00f20414c210c5e9cfd1d0975066673.png" src="_images/4a5574bad646440c723988338f6efd6af00f20414c210c5e9cfd1d0975066673.png" />
</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">lmdiag</span></code>パッケージを使う。</p>
Expand All @@ -1134,7 +1134,7 @@ <h3>ケース2:説明変数の2乗項の欠落<a class="headerlink" href="
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/a250a0206ca426a14765e76d784430cd4d5c1679e4e0d9f8af4d41bb8bea4254.png" src="_images/a250a0206ca426a14765e76d784430cd4d5c1679e4e0d9f8af4d41bb8bea4254.png" />
<img alt="_images/ec367371d39f4c322bf447389c1b36e2b2ee64bc9f82bacc40c8e065245f1f1f.png" src="_images/ec367371d39f4c322bf447389c1b36e2b2ee64bc9f82bacc40c8e065245f1f1f.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -1184,7 +1184,7 @@ <h3>ケース3:定数項がある条件により変化する場合<a class="
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/a55987f72e48595c2890a946b31bed807c3a3359900c782dffcb70ed7d05318e.png" src="_images/a55987f72e48595c2890a946b31bed807c3a3359900c782dffcb70ed7d05318e.png" />
<img alt="_images/14ea2eb74f63a44ad2f79a118c41850389651c44d11c7e9fb381da083e4bbd60.png" src="_images/14ea2eb74f63a44ad2f79a118c41850389651c44d11c7e9fb381da083e4bbd60.png" />
</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">lmdiag</span></code>パッケージを使う。</p>
Expand All @@ -1197,7 +1197,7 @@ <h3>ケース3:定数項がある条件により変化する場合<a class="
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/fd3a758d064e24cd70dbacf4eef8b9bd80a23b94b93a9f73394cdd1808ad1a6c.png" src="_images/fd3a758d064e24cd70dbacf4eef8b9bd80a23b94b93a9f73394cdd1808ad1a6c.png" />
<img alt="_images/d509a8a7a726490cc121541a20363c58e55f3b67cae1e4daa0fc792f8d99a92a.png" src="_images/d509a8a7a726490cc121541a20363c58e55f3b67cae1e4daa0fc792f8d99a92a.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -1250,7 +1250,7 @@ <h3>ケース4:不均一分散<a class="headerlink" href="#id13" title="Link
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/683e1f5aa1cfe7be7ce6c2c06bc651303b3cf98f82c1001e9a6f68a4fffa7c5a.png" src="_images/683e1f5aa1cfe7be7ce6c2c06bc651303b3cf98f82c1001e9a6f68a4fffa7c5a.png" />
<img alt="_images/827c9ee16b4db0124279f3b37da638ce6acb5d339400380c4e280551ebab3e21.png" src="_images/827c9ee16b4db0124279f3b37da638ce6acb5d339400380c4e280551ebab3e21.png" />
</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">lmdiag</span></code>パッケージを使う。</p>
Expand All @@ -1263,7 +1263,7 @@ <h3>ケース4:不均一分散<a class="headerlink" href="#id13" title="Link
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/099fbbf21ae6e28c9e53efc604a5dcb4d8a6f30d00ab38ae2be17e3c666df7d6.png" src="_images/099fbbf21ae6e28c9e53efc604a5dcb4d8a6f30d00ab38ae2be17e3c666df7d6.png" />
<img alt="_images/13e8353644c12228d3871d1037263e24697feebae130290214c79574f8def095.png" src="_images/13e8353644c12228d3871d1037263e24697feebae130290214c79574f8def095.png" />
</div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion 11_Inference.html
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ <h4>例2<a class="headerlink" href="#id14" title="Link to this heading">#</a><
Model: OLS Adj. R-squared: 0.622
Method: Least Squares F-statistic: 117.1
Date: Fri, 26 Apr 2024 Prob (F-statistic): 2.94e-72
Time: 01:07:44 Log-Likelihood: -385.11
Time: 01:22:49 Log-Likelihood: -385.11
No. Observations: 353 AIC: 782.2
Df Residuals: 347 BIC: 805.4
Df Model: 5
Expand Down
Loading

0 comments on commit 24e1b4a

Please sign in to comment.