• 沒有找到結果。

以每年參觀 Lake Keepit 的人數為 例

N/A
N/A
Protected

Academic year: 2021

Share "以每年參觀 Lake Keepit 的人數為 例"

Copied!
17
0
0

加載中.... (立即查看全文)

全文

(1)

以每年參觀 Lake Keepit 的人數為 例

數 98 級乙班 林柏佐

494402345

(2)

Variable

Dist=Distance

Inc=Family Income

Size=Family Members

Y=Numbers of Vistors

(3)

pair

(4)

Residuals Plot-SLR

(5)

Box-Cox

(6)

Transformation

fm1<-lm(log(Y+1)~Dist+Inc+Size)

在做轉換時,要注意各係數都必須是正數,

因為 Y 有 0 ,所以我讓其加 1 ,來做 regressi on

(7)

Residuals Plot-Transformation

(8)

Select Model

fm2<-lm(log(Y+1)~Dist+Size) Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept) 1.613546 0.104927 15.378 < 2e-16 ***

Dist -0.014158 0.001071 -13.218 < 2e-16 ***

Size 0.084795 0.023403 3.623 0.000353 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.5169 on 247 degrees of freedom Multiple R-squared: 0.4295, Adjusted R-squared: 0.4249 F-statistic: 92.99 on 2 and 247 DF, p-value: < 2.2e-16

(9)

Residuals Plot-Select Model

(10)

Variance Stable

Call:

lm(formula = sqrt(Y) ~ Dist + Inc + Size) Residuals:

Min 1Q Median 3Q Max -1.6186 -0.4273 0.0727 0.4570 1.6070 Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept) 1.884998 0.184333 10.226 < 2e-16 ***

Dist -0.017528 0.001348 -13.000 < 2e-16 ***

Inc 0.024612 0.018196 1.353 0.17742 Size 0.104933 0.029553 3.551 0.00046 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.6507 on 246 degrees of freedom Multiple R-squared: 0.424, Adjusted R-squared: 0.417 F-statistic: 60.36 on 3 and 246 DF, p-value: < 2.2e-16

(11)

Residuals Plot-Variance Stable

(12)

WLS

lm(formula = sqrt(Y) ~ Dist + Inc + Size, weights = wi) Residuals:

Min 1Q Median 3Q Max -3.1818 -0.8134 0.1118 0.9051 3.2484 Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept) 1.874293 0.181835 10.308 < 2e-16 ***

Dist -0.018063 0.001328 -13.599 < 2e-16 ***

Inc 0.027104 0.017669 1.534 0.126323# 收入太低決定將其拿掉 Size 0.113891 0.029023 3.924 0.000113 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.233 on 246 degrees of freedom Multiple R-squared: 0.4511, Adjusted R-squared: 0.4444 F-statistic: 67.38 on 3 and 246 DF, p-value: < 2.2e-16

(13)

Residuals Plot-WLS

(14)

WLS+Model Selection

Call:

lm(formula = sqrt(Y) ~ Dist + Size, weights = wi) Residuals:

Min 1Q Median 3Q Max -3.2532 -0.8942 0.1028 0.9767 3.0845 Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept) 2.077797 0.124694 16.663 < 2e-16 ***

Dist -0.018099 0.001332 -13.590 < 2e-16 ***

Size 0.109893 0.028985 3.791 0.000188 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.236 on 247 degrees of freedom Multiple R-squared: 0.4458, Adjusted R-squared: 0.4413 F-statistic: 99.34 on 2 and 247 DF, p-value: < 2.2e-16

(15)

Residuals Plot-WLS+Model Selcetion

(16)

結論

最後我選擇

這個 model, 但是其實還是有很多要改進

,它的 R-squared 太低,解釋力不夠。或許利 用 generalized least square 可以解決這個問題。

2.077797 0.018099Dist 0.109893Size

Y   

(17)

The End

Thanks for your attention.

參考文獻

相關文件

三、 「攝影競賽」採個人參賽,每人參賽作品以一件為原則, 「國小組」 、 「國中 組」、「高中組」的參賽者可加一名指導老師,每位指導老師至多指導一名

另外我們還可以觀察到,在 1930 年以後的一段時間,人口

• Description “pauses” story time while using plot time; there can be a nearly complete distinction between the forms of time.. • Ellipsis skips forward in story time while

按計算機得到 log 2 的近似值的確是十分簡便,但不免有學生會好奇,以前的數學家 是怎麼求出 log

有關歐拉的紀念郵票,最早在 1957 年,瑞士(圖一)及前蘇聯(圖二)為了紀念歐 拉二百五十週年誕辰而發行。圖三由前東德(DDR)於 1983

Bingham &amp; Sitter (2001) used the usual minimum-aberration criterion for unblocked designs to compare split-plot designs, but since it often leads to more than one

一 寫作評講(詩歌) 運用三至五個評講重點賞析同儕創作的詩歌 二 寫作評講(短文) 運用寫作評量表評鑑同儕創作的文章. 三

所以 10 個數字 個數字 個數字 個數字 pattern 就產生 就產生 就產生 就產生 10 列資料 列資料 列資料 列資料 ( 每一橫 每一橫 每一橫