User Tools

Site Tools


sequential_regression

This is an old revision of the document!


Table of Contents

데이터

DATA for regression analysis
bankaccount income famnum
6 220 5
5 190 6
7 260 3
7 200 4
8 330 2
10 490 4
8 210 3
11 380 2
9 320 1
9 270 3
datavar <- read.csv("http://commres.net/wiki/_media/regression01-bankaccount.csv")

Enter

Model Summaryb
Model R R Square Adjusted R Square Std. Error of the Estimate Change Statistics
R Square Change F Change df1 df2 Sig. F Change
1 .893a .798 .740 .930 .798 13.838 2 7 .004
a. Predictors: (Constant), 가족숫자, 수입
b. Dependent Variable: 통장갯수
ANOVAa
Model Sum of Squares df Mean Square F Sig.
1 Regression 23.944 2 11.972 13.838 .004b
Residual 6.056 7 .865
Total 30.000 9
a. Dependent Variable: 통장갯수
b. Predictors: (Constant), 가족숫자, 수입
Coefficientsa
Model Unstandardized Coefficients Standardized Coefficients t Sig. Correlations
B Std. Error Beta Zero-order Partial Part
1 (Constant) 6.399 1.517 4.220 .004
수입 .012 .004 .616 3.325 .013 .794 .783 .565
가족숫자 -.545 .226 -.446 -2.406 .047 -.692 -.673 -.409
a. Dependent Variable: 통장갯수

$\hat{Y} = 6.399 + .012 X_{1} + -.545 X_{2} $

The below is just an exercise for figuring out the unique part of r2 value for x1 and x2 (수입, 가족수). For more information see part and zero-order relationship: see determining_ivs_role in multiple regression

zero-order part
x1 x2 x1p x2p
.794 -.692 .565 -.409
zero-order square part (in spss) = semipartial (in general)
x1 sq (x1sq) x2 sq (x1sq) x1 part sq (x1psq) x2 part sq (x1psq)
.630436 .478864 .319225 .167281
a+b / a+b+c+d b+c / a+b+c+d a / a+b+c+d c / a+b+c+d

x1sq - x1psq ~= x2sq - x2psq
0.311211 ~= 0.311583

Seq.

Model Summaryc
Model R R Square Adjusted R Square Std. Error of the Estimate Change Statistics
R Square Change F Change df1 df2 Sig. F Change
1 .794a .631 .585 1.176 .631 13.687 1 8 .006
2 .893b .798 .740 .930 .167 5.791 1 7 .047
a. Predictors: (Constant), 수입
b. Predictors: (Constant), 수입, 가족숫자
c. Dependent Variable: 통장갯수

증가한 r2값에 대한 F-test 결과는 Fdiff=5.791, p = .047 (less than .05)

ANOVAa
Model Sum of Squares df Mean Square F Sig.
1 Regression 18.934 1 18.934 13.687 .006b
Residual 11.066 8 1.383
Total 30.000 9
2 Regression 23.944 2 11.972 13.838 .004c
Residual 6.056 7 .865
Total 30.000 9
a. Dependent Variable: 통장갯수
b. Predictors: (Constant), 수입
c. Predictors: (Constant), 수입, 가족숫자
Coefficientsa
Model Unstandardized Coefficients Standardized Coefficients t Sig. Correlations
B Std. Error Beta Zero-order Partial Part
1 (Constant) 3.618 1.242 2.914 .019
수입 .015 .004 .794 3.700 .006 .794 .794 .794
2 (Constant) 6.399 1.517 4.220 .004
수입 .012 .004 .616 3.325 .013 .794 .783 .565
가족숫자 -.545 .226 -.446 -2.406 .047 -.692 -.673 -.409
a. Dependent Variable: 통장갯수

http://imaging.mrc-cbu.cam.ac.uk/statswiki/FAQ/hier
https://ww2.coastal.edu/kingw/statistics/R-tutorials/multregr.html

r

datavar 
m1 <- lm(bankaccount~income+famnum, data=datavar)
summary(m1)
library(ppcor)
spcor(datavar)
pcor(datavar)
sequential_regression.1571350660.txt.gz · Last modified: 2019/10/18 07:17 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki