• 検索結果がありません。

ExcelでR自由自在 ishida.motohiro RExcel 2

N/A
N/A
Protected

Academic year: 2018

シェア "ExcelでR自由自在 ishida.motohiro RExcel 2"

Copied!
113
0
0

読み込み中.... (全文を見る)

全文

(1)

Excel

R

自由自在

カラー図版 その2

R

M

・ハイバーガー

(2)

第7章 一元配置の分散分析 145

7.1 データ . . . 145

7.2 プロット . . . 146

7.2.1 ドットプロット . . . 146

7.2.2 箱ひげ図 . . . 146

7.3 ANOVAの実行方法 . . . 146

7.4 ANOVA表とF検定. . . 146

7.5 平均値の表. . . 146

7.6 多重比較 . . . 146

7.7 平均–平均多重比較(MMC)プロット . . . 146

7.8 線形対比 . . . 146

第8章 単線形回帰分析 159 8.1 RExcel/Rcmdrの最小二乗法による回帰分析 . . . 160

(3)

iv

10.1 重回帰モデル . . . 191

10.2 サンプルデータ . . . 191

10.3 複数の線形モデルの指定とあてはめ. . . 197

10.4 グラフによるモデル比較. . . 201

10.4.1 残差∼予測値 プロット . . . 203

10.4.2 比較を容易にするためにプロットの目盛を変更 . . . 205

10.4.3 軸目盛を調整したlatticeプロット . . . 208

10.4.4 右クリックで積み重ねデータの作成 . . . 208

10.4.5 latticeのプロットを作成するメニューとダイアログボックス . 212 10.5 ANOVA表 . . . 214

10.6 信頼区間と予測区間 . . . 216

第11章多項回帰 219 11.1 Polynomial of order two . . . 219

11.2 直線によるあてはめ . . . 219

11.3 2次項によるあてはめ . . . 219

11.4 残差平方のプロット . . . 219

第12章重回帰分析—X 変数が複数の場合 233 12.1 オーストリアの大学生の靴のサイズ. . . 234

12.2 プロット . . . 240

(4)

7

一元配置の分散分析

本章の概要

(5)

146 第7章 一元配置の分散分析

図7.2:

図7.3:

7.2

プロット

7.2.1

ドットプロット

7.2.2

箱ひげ図

7.3

ANOVA

の実行方法

(6)

7.8. 線形対比 147

(7)

148 第7章 一元配置の分散分析

(8)
(9)
(10)
(11)

152 第7章 一元配置の分散分析

F density: ν1=5 ν2=65

F density

(12)

7.8. 線形対比 153

F density: ν1=5 ν2=65

F density

(13)

154 第7章 一元配置の分散分析

−200 −100 0 100 200

sunflower − soybean sunflower − meatmeal soybean − meatmeal sunflower − linseed soybean − linseed meatmeal − linseed sunflower − horsebean soybean − horsebean meatmeal − horsebean linseed − horsebean sunflower − casein soybean − casein meatmeal − casein linseed − casein horsebean − casein (

( ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 95% family−wise confidence level

Linear Function

(14)
(15)

156 第7章 一元配置の分散分析

multiple comparisons of means of weight

simultaneous 95% confidence limits, Tukey method

(16)
(17)

158 第7章 一元配置の分散分析

multiple comparisons of means of weight

contrast value

−200 −100 0 100 200 300

simultaneous 95% confidence limits, Tukey method

mean weight

feed level contrast

linseed soybean meatmeal casein sunflower linseed soybean meatmeal caseinsunflower horsebean 328.92 sunflower 323.58 casein 276.91 meatmeal 246.43 soybean 218.75 linseed 160.20 horsebean su−ca me−sl so−li su.ca−rest msl−h

−200 −100 0 100 200 300

(18)

8

単線形回帰分析

(19)

160 第8章 単線形回帰分析

8.1

RExcel/Rcmdr

の最小二乗法による回帰分析

(20)
(21)

162 第8章 単線形回帰分析

(22)

8.2. 散布図 163

(23)
(24)
(25)

166 第8章 単線形回帰分析

8.3

線形回帰分析

(26)

8.3. 線形回帰分析 167

(27)

168 第8章 単線形回帰分析

(28)

8.4. 残差分析 169

8.4

残差分析

(29)

170 第8章 単線形回帰分析

図8.16:

a.デフォルトでは小数点位置が揃っていない.

(30)
(31)
(32)

8.5. 信頼幅と予測幅 173

8.5

信頼幅と予測幅

(33)
(34)

9

最小二乗法とは何か

本章の概要

(35)
(36)
(37)
(38)
(39)
(40)
(41)
(42)
(43)

184 第9章 最小二乗法とは何か

9.2

ハット対角成分とてこ比

(44)
(45)
(46)

9.2. ハット対角成分とてこ比 187

図9.13:

Fig.?? Fig.?? Fig.??

(47)

188 第9章 最小二乗法とは何か

9.3

残差とてこ比

(48)
(49)

190 第9章 最小二乗法とは何か

9.4

ワークブックの値のリセット

(50)

10

重回帰分析

X

変数二つの

場合

本章の概要

10.1

重回帰モデル

(51)

192 第10章 重回帰分析—X変数二つの場合

(52)
(53)
(54)
(55)
(56)

10.3. 複数の線形モデルの指定とあてはめ 197

10.3

複数の線形モデルの指定とあてはめ

(57)

198 第10章 重回帰分析—X変数二つの場合

(58)

10.3. 複数の線形モデルの指定とあてはめ 199

(59)
(60)

10.4. グラフによるモデル比較 201

10.4

グラフによるモデル比較

a.モデルの指定.

(61)

202 第10章 重回帰分析—X変数二つの場合

図10.16:

(62)

10.4. グラフによるモデル比較 203

(63)

204 第10章 重回帰分析—X変数二つの場合

abrasion ˜ hardness,s=60,R

2=0

.544

abrasion ˜ strength,s=85,R

2=0

.089

abrasion ˜ hardness + strength,s=36,R

2=0

(64)

10.4. グラフによるモデル比較 205

(65)

206 第10章 重回帰分析—X変数二つの場合

abrasion ˜ hardness,s=60,R

2=0

.544

abrasion ˜ strength,s=85,R

2=0

.089

abrasion ˜ hardness + strength,s=36,R

2=0

(66)

10.4. グラフによるモデル比較 207

scatterplot(residuals.RegModel.3˜fitted.RegModel.3, reg.line=lm, smooth=FALSE, labels=FALSE, boxplots=FALSE, span=0.5, cex=2,

cex.axis=1.3,

cex.lab=1.3, pch=16, data=abrasion)

scatterplot(residuals.RegModel.3˜fitted.RegModel.3, reg.line=lm, smooth=FALSE, labels=FALSE, boxplots=FALSE, span=0.5, cex=2,

cex.axis=1.3,

(67)

208 第10章 重回帰分析—X変数二つの場合

10.4.3

軸目盛を調整した

lattice

プロット

図10.23:

(68)

10.4. グラフによるモデル比較 209

(69)

210 第10章 重回帰分析—X変数二つの場合

a.Paste as Stackedをクリックした際の標準列名.

(70)

10.4. グラフによるモデル比較 211

(71)

212 第10章 重回帰分析—X変数二つの場合

10.4.5

lattice

のプロットを作成するメニューとダイアログボックス

(72)
(73)

214 第10章 重回帰分析—X変数二つの場合

10.5

ANOVA

(74)
(75)

216 第10章 重回帰分析—X変数二つの場合

(76)

10.6. 信頼区間と予測区間 217

> .NewData <- data.frame(hardness=60, strength=200, row.names="1")

> .NewData # Newdata hardness strength 1 60 200

> predict(RegModel.1, newdata=.NewData, interval="confidence", + level=.95, se.fit=FALSE)

(77)

11

多項回帰

本章の概要

11.1

X

2

次関数による回帰

11.2

直線によるあてはめ

11.3

2

次項によるあてはめ

(78)
(79)
(80)
(81)

11.4. 残差平方のプロット 223

(82)
(83)
(84)

226 第11章 多項回帰

(85)

11.4. 残差平方のプロット 227

(86)
(87)
(88)
(89)
(90)

12

重回帰分析

X

変数が複数の

場合

(91)

234 第12章 重回帰分析—X変数が複数の場合

(92)
(93)
(94)
(95)
(96)

12.1. オーストリアの大学生の靴のサイズ 239

EduFatherandEduMotherBefore EduFatherandEduMotherAfter

(97)

240 第12章 重回帰分析—X変数が複数の場合

(98)
(99)
(100)

12.2. プロット 243

(101)

244 第12章 重回帰分析—X変数が複数の場合

xyplot(Shoesize ˜

Size + SizeFather + SizeMother + Weight | Gender,

outer=TRUE, layout=c(2, 4), type="p", pch=16, auto.key=list(border=TRUE), par.settings=simpleTheme(pch=16), scales=list( x=list(relation=’free’, limits=list( c(132,205),c(132,205), c(132,205),c(132,205), c(132,205),c(132,205), c(0,150), c(0,150))), y=list(relation=’same’)), data=StudentData)

(102)

12.2. プロット 245

xyplot(Shoesize ˜ Size + Weight + SizeFather + SizeMother, outer=TRUE, layout=c(2, 3),

skip=c(FALSE,FALSE,FALSE,TRUE,FALSE), groups=Gender, auto.key=list(border=TRUE) , scales=list(relation=’free’, x=list(limits=list(c(132,205), c(39,150), c(132,205), c(132,205))), y=list(limits=c(34,50))), data=StudentData)

(103)

246 第12章 重回帰分析—X変数が複数の場合

(104)
(105)
(106)

12.4. 基本診断プロット 249

(107)
(108)

12.5. 信頼区間 251

(109)
(110)

13

分割表とカイ自乗検定

(111)

254 第13章 分割表とカイ自乗検定

13.1

性別と喫煙習慣

(112)

13.1. 性別と喫煙習慣 255

(113)

256 第13章 分割表とカイ自乗検定

参照

関連したドキュメント

Apply a minimum of 29 fl oz/A of Ignite 280 SL Herbicide for burndown of existing weeds just prior to planting or prior to emergence of canola, corn, cotton, soybean, or sugar

2)海を取り巻く国際社会の動向

This program, at 2 to 4 ounces per acre can be used in the fall to provide residual weed control in fields that will be planted the following spring with field corn, peanut or soybean

Apply a minimum of 29.0 fluid ounces per acre of Forfeit 280 for burndown of exist- ing weeds just prior to planting or prior to emergence of canola, corn, cotton, rice*, soybean,

Reckon 280SL is a water-soluble herbicide for application as a foliar spray for the control of a broad spectrum of emerged annual and perennial grass and broadleaf weeds in

[ … ] We need to contextualize the success of happiness of individuals by relating their wellbeing to the harms or benefits they create for others” (Cieslik, 2017, pp... Was

The International Review Committee reviewed the Taiwan government’s State report in 2017 and concluded the following: the government in Taiwan must propose new

This establishment of trust, then strengthened by the positive actions of the Islamic community, has led to increased levels of trust between the two communities since the