Size: px
Start display at page:

Download ""

Transcription

1 lavaan: R Yves Rosseel Department of Data Analysis Ghent University (Belgium) lavaan lavaan * lavaan : : CFA arakit@kansai-u.ac.jp *1 lavaan: an R package for structural equation modeling and more ~yrosseel/lavaan/lavaanintroduction.pdf 1

2 : lavaan ˆ 1 R R ˆ lavaan lavaan / cfa sem ˆ ˆ R lavaan R R 2

3 SPSS R R ˆ lavaan lavaan ˆ lavaan ˆ lavaan Mplus SEM cfa sem growth mimic="eqs" 9.2 ˆ lavaan lavaan@googlegroups.com github R ˆ lavaan lavaan lavaan CRAN lavaan R > install.packages("lavaan") > library(lavaan) This is lavaan lavaan is BETA software! Please report any bugs. 3 lavaan lavaan R 3

4 y x1 + x2 + x3 + x4 y + lavaan f y f1 + f2 + x1 + x2 f1 f2 + f3 f2 f3 + x1 + x2 manifest = manifested 3 f1 f2 f3 f1 = y1 + y2 + y3 f2 = y4 + y5 + y6 f3 = y7 + y8 + y9 + y10 2 y1 y1 y1 y2 f1 f2 1 y1 1 f1 1 4 = ( ) R > mymodel <- # y1 + y2 ~ f1 + f2 + x1 + x2 f1 ~ f2 + f3 4

5 f2 ~ f3 + x1 + x2 # f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 f3 =~ y7 + y8 + y9 + y10 # y1 ~~ y1 y1 ~~ y2 f1 ~~ f2 # y1 ~ 1 f1 ~ 1 R & mymodel # 3.2 mymodel.lav Word R > mymodel <- readlines("/mydirectory/mymodel.lav") readlines mymodel 4 : : CFA cfa CFA cfa CFA lavaan Holzinger- Swineford1939 R > >?HolzingerSwineford1939 SEM SEM 2 Pasteur Grant-White 7 8 5

6 lavaan syntax visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x CFA 3 ˆ 3 x1, x2 x3 visual ˆ 3 x4, x5 x6 textual ˆ 3 x7 x8 x9 speed 3 lavaan 3 = (1) = = cfa > HS.model <- + visual =~ x1 + x2 + x3 + textual =~ x4 + x5 + x6 + speed =~ x7 + x8 + x9 + CFA > fit <- cfa(hs.model, data = HolzingerSwineford1939) 6

7 lavaan cfa 1 2 summary > summary(fit, fit.measures = TRUE) lavaan (0.5-12) converged normally after 41 iterations Number of observations 301 Estimator ML Minimum Function Test Statistic Degrees of freedom 24 P-value (Chi-square) Model test baseline model: Minimum Function Test Statistic Degrees of freedom 36 P-value Full model versus baseline model: Comparative Fit Index (CFI) Tucker-Lewis Index (TLI) Loglikelihood and Information Criteria: Loglikelihood user model (H0) Loglikelihood unrestricted model (H1) Number of free parameters 21 Akaike (AIC) Bayesian (BIC) Sample-size adjusted Bayesian (BIC) Root Mean Square Error of Approximation: RMSEA Percent Confidence Interval P-value RMSEA <= Standardized Root Mean Square Residual: SRMR Parameter estimates: Information Standard Errors Expected Standard Latent variables: Estimate Std.err Z-value P(> z ) 7

8 visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Variances: x x x x x x x x x visual textual speed SEM 1 3 R code # lavaan 1 library(lavaan) # HS.model <- visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 # fit <- cfa(hs.model, data=holzingerswineford1939) 8

9 # summary(fit, fit.measures=true) R & lavaan 1. lavaan cfa lavaan sem growth 3 lavaan 3. RMSEA R PoliticalDemocracy Bollen 1989 lavaan syntax # ind60 =~ x1 + x2 + x3 dem60 =~ y1 + y2 + y3 + y4 dem65 =~ y5 + y6 + y7 + y8 # dem60 ~ ind60 dem65 ~ ind60 + dem60 # y1 ~~ y5 y2 ~~ y4 + y6 y3 ~~ y7 y4 ~~ y8 y6 ~~ y8 3 R ~~ 9

10 2 2 2 lavaan y1 ~~ y y2 ~~ y4 y2 ~~ y6 y2 ~~ y4 + y6 > model <- + # measurement model + ind60 =~ x1 + x2 + x3 + dem60 =~ y1 + y2 + y3 + y4 + dem65 =~ y5 + y6 + y7 + y8 + + # regressions + dem60 ~ ind60 + dem65 ~ ind60 + dem # residual correlations + y1 ~~ y5 + y2 ~~ y4 + y6 + y3 ~~ y7 + y4 ~~ y8 + y6 ~~ y8 + > fit <- sem(model, data = PoliticalDemocracy) > summary(fit, standardized = TRUE) lavaan (0.5-12) converged normally after 70 iterations Number of observations 75 Estimator ML Minimum Function Test Statistic Degrees of freedom 35 P-value (Chi-square) Parameter estimates: Information Standard Errors Expected Standard Estimate Std.err Z-value P(> z ) Std.lv Std.all Latent variables: ind60 =~ x x x dem60 =~ 10

11 y y y y dem65 =~ y y y y Regressions: dem60 ~ ind dem65 ~ ind dem Covariances: y1 ~~ y y2 ~~ y y y3 ~~ y y4 ~~ y y6 ~~ y Variances: x x x y y y y y y y y ind dem dem sem cfa 2 summary fit.measures=true 2 standardized=true

12 Std.lv 2 Std.all R code library(lavaan) # 1 model <- # ind60 =~ x1 + x2 + x3 dem60 =~ y1 + y2 + y3 + y4 dem65 =~ y5 + y6 + y7 + y8 # dem60 ~ ind60 dem65 ~ ind60 + dem60 # y1 ~~ y5 y2 ~~ y4 + y6 y3 ~~ y7 y4 ~~ y8 y6 ~~ y8 fit <- sem(model, data=politicaldemocracy) summary(fit, standardized=true) lavaan lavaan syntax f =~ y1 + 1*y2 + 1*y3 + 1*y4 lavaan 12

13 pre-multiplication Holzinger and Swineford 3 CFA CFA 0 0 speed 1 1 x7 1 NA lavaan syntax # three-factor model visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ NA*x7 + x8 + x9 # orthogonal factors visual ~~ 0*speed textual ~~ 0*speed # fix variance of speed factor speed ~~ 1*speed CFA cfa orthogonal=true > HS.model <- visual =~ x1 + x2 + x3 + textual =~ x4 + x5 + x6 + speed =~ x7 + x8 + x9 > fit.hs.ortho <- cfa(hs.model, data=holzingerswineford1939, orthogonal=true) CFA 1 cfa std.lv=true > HS.model <- visual =~ x1 + x2 + x3 + textual =~ x4 + x5 + x6 + speed =~ x7 + x8 + x9 > fit <- cfa(hs.model, data=holzingerswineford1939, std.lv=true) std.lv=true lavaan start() 13

14 lavaan syntax visual =~ x1 + start(0.8)*x2 + start(1.2)*x3 textual =~ x4 + start(0.5)*x5 + start(1.0)*x6 speed =~ x7 + start(0.7)*x8 + start(1.8)*x9 1 x1 x4 x7 5.3 lavaan PolitcalDemocracy > model <- + # + ind60 =~ x1 + x2 + x3 + dem60 =~ y1 + y2 + y3 + y4 + dem65 =~ y5 + y6 + y7 + y8 + # regressions + dem60 ~ ind60 + dem65 ~ ind60 + dem60 + # residual (co)variances + y1 ~~ y5 + y2 ~~ y4 + y6 + y3 ~~ y7 + y4 ~~ y8 + y6 ~~ y8 + > fit <- sem(model, data=politicaldemocracy) > coef(fit) ind60=~x2 ind60=~x3 dem60=~y2 dem60=~y3 dem60=~y4 dem65=~y dem65=~y7 dem65=~y8 dem60~ind60 dem65~ind60 dem65~dem60 y1~~y y2~~y4 y2~~y6 y3~~y7 y4~~y8 y6~~y8 x1~~x x2~~x2 x3~~x3 y1~~y1 y2~~y2 y3~~y3 y4~~y y5~~y5 y6~~y6 y7~~y7 y8~~y8 ind60~~ind60 dem60~~dem dem65~~dem coef

15 > model <- + # + ind60 =~ x1 + x2 + mylabel*x3 + dem60 =~ y1 + y2 + y3 + y4 + dem65 =~ y5 + y6 + y7 + y8 + # + dem60 ~ ind60 + dem65 ~ ind60 + dem60 + # + y1 ~~ y5 + y2 ~~ y4 + y6 + y3 ~~ y7 + y4 ~~ y8 + y6 ~~ y8 + a-za-z 13bis lavaan label() " " = H&S CFA x2 x3 2 lavaan 2 1 visual =~ x1 + v2*x2 + v2*x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 lavaan syntax equal() lavaan syntax visual =~ x1 + x2 + equal("visual=~x2")*x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 15

16 x2 visual=~x2 x3 equal() x y ~ b1*x1 + b2*x2 + b3*x3 lavaan syntax b1 b2 b3 4 > set.seed(1234) > Data <- data.frame(y = rnorm(100), x1 = rnorm(100), x2 = rnorm(100), + x3 = rnorm(100)) > model <- y ~ b1*x1 + b2*x2 + b3*x3 > fit <- sem(model, data=data) > coef(fit) b1 b2 b3 y~~y b1 = (b2 + b3) 2 b1 > exp(b2 + b3) 2. 2 lavaan syntax model.constr <- # y ~ b1*x1 + b2*x2 + b3*x3 # b1 == (b2 + b3)^2 b1 > exp(b2 + b3) > model.constr <- # + y ~ b1*x1 + b2*x2 + b3*x3 + # + b1 == (b2 + b3)^2 + b1 > exp(b2 + b3) > fit <- sem(model.constr, data=data) > coef(fit) b1 b2 b3 y~~y b1 exp(b2 + b3) 16

17 lavaan 1 (2) 1 H&S3 CFA # 3 visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 lavaan syntax # x1 ~ 1 x2 ~ 1 x3 ~ 1 x4 ~ 1 x5 ~ 1 x6 ~ 1 x7 ~ 1 x8 ~ 1 x9 ~ 1 cfa sem meanstructure=true H&S3 CFA > fit <- cfa(hs.model, data = HolzingerSwineford1939, meanstructure = TRUE) > summary(fit) lavaan (0.5-12) converged normally after 41 iterations Number of observations 301 Estimator ML Minimum Function Test Statistic Degrees of freedom 24 P-value (Chi-square) Parameter estimates: 17

18 Information Standard Errors Expected Standard Estimate Std.err Z-value P(> z ) Latent variables: visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x x x x x x visual textual

19 speed Intercept cfa sem x1 x2 x3 x4 0.5 # 3 visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 lavaan syntax # x1 + x2 + x3 + x4 ~ 0.5*1 x1 ~ 0.5*1 x2 ~ 0.5*1 6.2 lavaan cfa sem group 2 Pasteur Grant-White H&S CFA > HS.model <- visual =~ x1 + x2 + x3 + textual =~ x4 + x5 + x6 + speed =~ x7 + x8 + x9 > fit <- cfa(hs.model, data=holzingerswineford1939, group="school") > summary(fit) lavaan (0.5-12) converged normally after 63 iterations Number of observations per group Pasteur 156 Grant-White 145 Estimator ML Minimum Function Test Statistic Degrees of freedom 48 P-value (Chi-square) Chi-square for each group: Pasteur

20 Grant-White Parameter estimates: Information Standard Errors Expected Standard Group 1 [Pasteur]: Estimate Std.err Z-value P(> z ) Latent variables: visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x x x

21 x x x visual textual speed Group 2 [Grant-White]: Estimate Std.err Z-value P(> z ) Latent variables: visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x

22 x x x x x visual textual speed lavaan syntax HS.model <- visual =~ x *x2 + c(0.6, 0.8)*x3 textual =~ x4 + start(c(1.2, 0.6))*x5 + a*x6 speed =~ x7 + x8 + x9 visual 1 x x2 0.5 textual x5 2 x6 a 1 2 c(a1,a2)*x6 c(a,a)*x6 1 > fit <- cfa(hs.model, data = HolzingerSwineford1939, group = "school") > summary(fit) lavaan (0.5-12) converged normally after 58 iterations Number of observations per group Pasteur 156 Grant-White 145 Estimator ML Minimum Function Chi-square Degrees of freedom 52 P-value (Chi-square) Chi-square for each group: Pasteur Grant-White Parameter estimates: Information Standard Errors Expected Standard 22

23 Group 1 [Pasteur]: Estimate Std.err Z-value P(> z ) Latent variables: visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x x x x x x visual textual speed

24 Group 2 [Grant-White]: Estimate Std.err Z-value P(> z ) Latent variables: visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x x x x x x visual textual

25 speed x3 > HS.model <- visual =~ x1 + x2 + c(v3,v3)*x3 + textual =~ x4 + x5 + x6 + speed =~ x7 + x8 + x cfa sem group.equal > HS.model <- visual =~ x1 + x2 + x3 + textual =~ x4 + x5 + x6 + speed =~ x7 + x8 + x9 > fit <- cfa(hs.model, data=holzingerswineford1939, group="school", + group.equal=c("loadings")) > summary(fit) lavaan (0.5-12) converged normally after 46 iterations Number of observations per group Pasteur 156 Grant-White 145 Estimator ML Minimum Function Test Statistic Degrees of freedom 54 P-value (Chi-square) Chi-square for each group: Pasteur Grant-White Parameter estimates: Information Standard Errors Expected Standard Group 1 [Pasteur]: Latent variables: visual =~ Estimate Std.err Z-value P(> z ) 25

26 x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x x x x x x visual textual speed Group 2 [Grant-White]: Estimate Std.err Z-value P(> z ) 26

27 Latent variables: visual =~ x x x textual =~ x x x speed =~ x x x Covariances: visual ~~ textual speed textual ~~ speed Intercepts: x x x x x x x x x visual textual speed Variances: x x x x x x x x x visual textual speed

28 ˆ "intercepts" ˆ "means" / ˆ "residuals" ˆ "residual.covariances" ˆ "lv.variances" ˆ "lv.covariances" ˆ "regressions" group.partial > fit <- cfa(hs.model, data=holzingerswineford1939, group="school", + group.equal=c("loadings", "intercepts"), + group.partial=c("visual=~x2", "x7~1")) CFA measurementinvariance 0.5 measurementinvariance() semtools 2 cfi lavaan measurementinvariance > library(semtools) > measurementinvariance(hs.model, data=holzingerswineford1939, group="school") Measurement invariance tests: Model 1: configural invariance: chisq df pvalue cfi rmsea bic Model 2: weak invariance (equal loadings): chisq df pvalue cfi rmsea bic [Model 1 versus model 2] delta.chisq delta.df delta.p.value delta.cfi Model 3: strong invariance (equal loadings + intercepts): chisq df pvalue cfi rmsea bic [Model 1 versus model 3] 28

29 delta.chisq delta.df delta.p.value delta.cfi [Model 2 versus model 3] delta.chisq delta.df delta.p.value delta.cfi Model 4: equal loadings + intercepts + means: chisq df pvalue cfi rmsea bic [Model 1 versus model 4] delta.chisq delta.df delta.p.value delta.cfi [Model 3 versus model 4] delta.chisq delta.df delta.p.value delta.cfi group.partial Demo.growth lavaan syntax # 4 # i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4 s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 lavaan growth > model <- i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4 + s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 > fit <- growth(model, data=demo.growth) > summary(fit) lavaan (0.5-12) converged normally after 44 iterations Number of observations

30 Estimator ML Minimum Function Test Statistic Degrees of freedom 5 P-value (Chi-square) Parameter estimates: Information Standard Errors Expected Standard Estimate Std.err Z-value P(> z ) Latent variables: i =~ t t t t s =~ t t t t Covariances: i ~~ s Intercepts: t t t t i s Variances: t t t t i s growth sem 0 / 2 x1 x2 4 lavaan & R 30

31 lavaan syntax # # i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4 s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 # i ~ x1 + x2 s ~ x1 + x2 # t1 ~ c1 t2 ~ c2 t3 ~ c3 t4 ~ c4 R code # model <- # i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4 s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 # i ~ x1 + x2 s ~ x1 + x2 # t1 ~ c1 t2 ~ c2 t3 ~ c3 t4 ~ c4 fit <- growth(model, data=demo.growth) summary(fit)

32 /1 1, 2, 3,... K K > 2 K lavaan WLS R ordered() Data 4 item1, item2, item3, item4) > Data[,c("item1","item2","item3","item4")] <- + lapply(data[,c("item1","item2","item3","item4")], ordered) 2. cfa sem growth lavaan 1 ordered= 4 2 item1, item2, item3, item4 > fit <- cfa(mymodel, data=mydata, ordered=c("item1","item2","item3","item4")) lavaan WLSMV 2 DWLS > lower < > # classic wheaton et al model 32

33 > wheaton.cov <- getcov(lower, names=c("anomia67","powerless67", "anomia71", + "powerless71","education","sei")) > wheaton.model <- + # latent variables + ses =~ education + sei + alien67 =~ anomia67 + powerless67 + alien71 =~ anomia71 + powerless # regressions + alien71 ~ alien67 + ses + alien67 ~ ses + + # correlated residuals + anomia67 ~~ anomia71 + powerless67 ~~ powerless71 + > fit <- sem(wheaton.model, sample.cov=wheaton.cov, sample.nobs=932) > summary(fit, standardized=true) lavaan (0.5-12) converged normally after 82 iterations Number of observations 932 Estimator ML Minimum Function Test Statisti Degrees of freedom 4 P-value (Chi-square) Parameter estimates: Information Standard Errors Expected Standard Estimate Std.err Z-value P(> z ) Std.lv Std.all Latent variables: ses =~ education sei alien67 =~ anomia powerless alien71 =~ anomia powerless Regressions: alien71 ~ alien ses alien67 ~ ses Covariances: 33

34 anomia67 ~~ anomia powerless67 ~~ powerless Variances: education sei anomia powerless anomia powerless ses alien alien getcov() 2 getcov() sample.cov sample.mean sample.nobs lavaan estimator = "ML" lavaan ˆ "GLS" 2 ˆ "WLS" 2 ADF ˆ "MLM" Satorra-Bentler scaled test statistic ˆ "MLF" 1 ˆ "MLR" Huber-White Yuan-Bentler "ML" "MLM" "MLF" "MLR" lavaan n 1 n 2 n n 1 Mplus 2 n 1 34

35 likelihood="wishart" > fit <- cfa(hs.model, data = HolzingerSwineford1939, likelihood = "wishart") > fit lavaan (0.5-12) converged normally after 41 iterations Number of observations 301 Estimator ML Minimum Function Chi-square Degrees of freedom 24 P-value (Chi-square) EQ LISREL AMOS Wishart Mplus MCAR MAR lavaan missing="ml h ML missing="ml" information "expected" "observed" ML se "robust.mlm" "robust.mlr" "first.order" "none" "test" "standard" "Satorra-Bentler" "Yuan-Bentler" lavaan 2 se="boot" test="boot" p bootstraplavaan() lavaan Y X M 3 3 X Y X M Y > set.seed(1234) 35

36 > X <- rnorm(100) > M <- 0.5*X + rnorm(100) > Y <- 0.7*M + rnorm(100) > Data <- data.frame(x = X, Y = Y, M = M) > model <- # + Y ~ c*x + # + M ~ a*x + Y ~ b*m + # (a*b) + ab := a*b + # + total := c + (a*b) + > fit <- sem(model, data=data) > summary(fit) lavaan (0.5-12) converged normally after 13 iterations Number of observations 100 Estimator ML Minimum Function Test Statistic Degrees of freedom 0 P-value (Chi-square) Parameter estimates: Information Standard Errors Expected Standard Estimate Std.err Z-value P(> z ) Regressions: Y ~ X (c) M ~ X (a) Y ~ M (b) Variances: Y M Defined parameters: ab total lavaan := 36

37 se="bootstrap" 9.3 summary modindices=true modindices modindices > fit <- cfa(hs.model, data=holzingerswineford1939) > mi <- modindices(fit) > mi[mi$op == "=~",] #$ lhs op rhs mi epc sepc.lv sepc.all sepc.nox 1 visual =~ x1 NA NA NA NA NA 2 visual =~ x visual =~ x visual =~ x visual =~ x visual =~ x visual =~ x visual =~ x visual =~ x textual =~ x textual =~ x textual =~ x textual =~ x4 NA NA NA NA NA 14 textual =~ x textual =~ x textual =~ x textual =~ x textual =~ x speed =~ x speed =~ x speed =~ x speed =~ x speed =~ x speed =~ x speed =~ x7 NA NA NA NA NA 26 speed =~ x speed =~ x epc 2 EPC 9.4 summary coef 37

38 9.4.1 parameterestimates parameterestimates z > parameterestimates(fit) lhs op rhs est se z pvalue ci.lower ci.upper 1 visual =~ x NA NA visual =~ x visual =~ x textual =~ x NA NA textual =~ x textual =~ x speed =~ x NA NA speed =~ x speed =~ x x1 ~~ x x2 ~~ x x3 ~~ x x4 ~~ x x5 ~~ x x6 ~~ x x7 ~~ x x8 ~~ x x9 ~~ x visual ~~ visual textual ~~ textual speed ~~ speed visual ~~ textual visual ~~ speed textual ~~ speed standardizedsolution standardizedsolution parameterestimates fitted.values fitted fitted.values > fit <- cfa(hs.model, data = HolzingerSwineford1939) > fitted(fit) $cov x1 x2 x3 x4 x5 x6 x7 x8 x9 x x x x x x

39 x x x $mean x1 x2 x3 x4 x5 x6 x7 x8 x residuals resid residuals normalized standardized > fit <- cfa(hs.model, data=holzingerswineford1939) > resid(fit, type="standardized") $cov x1 x2 x3 x4 x5 x6 x7 x8 x9 x1 NA x NA x x NA x NA x NA NA x x NA x NA NA $mean x1 x2 x3 x4 x5 x6 x7 x8 x vcov vcov AIC BIC AIC BIC AIC BIC fitmeasures fitmeasures lavaan 1 CFI 2 > fit <- cfa(hs.model, data = HolzingerSwineford1939) > fitmeasures(fit, "cfi") cfi

40 9.4.8 inspect lavaan cfa sem growth inspect > inspect(fit) $lambda visual textul speed x x x x x x x x x $theta x1 x2 x3 x4 x5 x6 x7 x8 x9 x1 7 x2 0 8 x x x x x x x $psi visual textul speed visual 16 textual speed > inspect(fit, what="start") $lambda visual textul speed x x x x x x x x x $theta 40

41 x1 x2 x3 x4 x5 x6 x7 x8 x9 x x x x x x x x x $psi visual textul speed visual 0.05 textual speed lavaan > inspect(fit, what="list") id lhs op rhs user group free ustart exo label eq.id unco 1 1 visual =~ x visual =~ x NA visual =~ x NA textual =~ x textual =~ x NA textual =~ x NA speed =~ x speed =~ x NA speed =~ x NA x1 ~~ x NA x2 ~~ x NA x3 ~~ x NA x4 ~~ x NA x5 ~~ x NA x6 ~~ x NA x7 ~~ x NA x8 ~~ x NA x9 ~~ x NA visual ~~ visual NA textual ~~ textual NA speed ~~ speed NA visual ~~ textual NA visual ~~ speed NA textual ~~ speed NA inspect lavaan > class?lavaan 41

42 10 [lavaan] lavaan R : > sessioninfo() R.1 3 # ex3.1 Data <- read.table("ex3.1.dat") names(data) <- c("y1","x1","x2") model.ex3.1 <- y1 ~ x1 + x2 fit <- sem(model.ex3.1, data=data) summary(fit, standardized=true, fit.measures=true) # ex3.4 Data <- read.table("ex3.4.dat") names(data) <- c("u1", "x1", "x3") Data$u1 <- ordered(data$u1) model <- u1 ~ x1 + x3 fit <- sem(model, data=data) summary(fit, fit.measures=true) # ex3.11 Data <- read.table("ex3.11.dat") names(data) <- c("y1","y2","y3", "x1","x2","x3") model.ex3.11 <- y1 + y2 ~ x1 + x2 + x3 y3 ~ y1 + y2 + x2 fit <- sem(model.ex3.11, data=data) summary(fit, standardized=true, fit.measures=true) # ex3.12 Data <- read.table("ex3.12.dat") names(data) <- c("u1","u2","u3","x1","x2","x3") 42

43 Data$u1 <- ordered(data$u1) Data$u2 <- ordered(data$u2) Data$u3 <- ordered(data$u3) model <- u1 + u2 ~ x1 + x2 + x3 u3 ~ u1 + u2 + x2 fit <- sem(model, data=data) summary(fit, fit.measures=true) # Mplus 3.14 Data <- read.table("ex3.14.dat") names(data) <- c("y1","y2","u1","x1","x2","x3") Data$u1 <- ordered(data$u1) model <- y1 + y2 ~ x1 + x2 + x3 u1 ~ y1 + y2 + x2 fit <- sem(model, data=data) summary(fit, fit.measures=true).2 5 # ex5.1 Data <- read.table("ex5.1.dat") names(data) <- paste("y", 1:6, sep="") model.ex5.1 <- f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 fit <- cfa(model.ex5.1, data=data) summary(fit, standardized=true, fit.measures=true) # ex5.2 Data <- read.table("ex5.2.dat") names(data) <- c("u1","u2","u3","u4","u5","u6") # : Data <- as.data.frame(lapply(data, ordered)) model <- f1 =~ u1 + u2 + u3; f2 =~ u4 + u5 + u6 fit <- cfa(model, data=data) summary(fit, fit.measures=true) # ex5.3 Data <- read.table("ex5.3.dat") names(data) <- c("u1","u2","u3","y4","y5","y6") Data$u1 <- ordered(data$u1) Data$u2 <- ordered(data$u2) Data$u3 <- ordered(data$u3) model <- f1 =~ u1 + u2 + u3 f2 =~ y4 + y5 + y6 43

44 fit <- cfa(model, data=data) summary(fit, fit.measures=true) # ex5.6 Data <- read.table("ex5.6.dat") names(data) <- paste("y", 1:12, sep="") model.ex5.6 <- f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 f3 =~ y7 + y8 + y9 f4 =~ y10 + y11 + y12 f5 =~ f1 + f2 + f3 + f4 fit <- cfa(model.ex5.6, data=data, estimator="ml") summary(fit, standardized=true, fit.measures=true) # ex5.8 Data <- read.table("ex5.8.dat") names(data) <- c(paste("y", 1:6, sep=""), paste("x", 1:3, sep="")) model.ex5.8 <- f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 f1 + f2 ~ x1 + x2 + x3 fit <- cfa(model.ex5.8, data=data, estimator="ml") summary(fit, standardized=true, fit.measures=true) # ex5.9 Data <- read.table("ex5.9.dat") names(data) <- c("y1a","y1b","y1c","y2a","y2b","y2c") model.ex5.9 <- f1 =~ 1*y1a + 1*y1b + 1*y1c f2 =~ 1*y2a + 1*y2b + 1*y2c y1a + y1b + y1c ~ i1*1 y2a + y2b + y2c ~ i2*1 fit <- cfa(model.ex5.9, data=data) summary(fit, standardized=true, fit.measures=true) # ex5.11 Data <- read.table("ex5.11.dat") names(data) <- paste("y", 1:12, sep="") model.ex5.11 <- f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 f3 =~ y7 + y8 + y9 f4 =~ y10 + y11 + y12 f3 ~ f1 + f2 f4 ~ f3 fit <- sem(model.ex5.11, data=data, estimator="ml") summary(fit, standardized=true, fit.measures=true) 44

45 # ex5.14 Data <- read.table("ex5.14.dat") names(data) <- c("y1","y2","y3","y4","y5","y6", "x1","x2","x3", "g") model.ex5.14 <- f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 f1 + f2 ~ x1 + x2 + x3 fit <- cfa(model.ex5.14, data=data, group="g", meanstructure=false, group.equal=c("loadings"), group.partial=c("f1=~y3")) summary(fit, standardized=true, fit.measures=true) # ex5.15 Data <- read.table("ex5.15.dat") names(data) <- c("y1","y2","y3","y4","y5","y6", "x1","x2","x3", "g") model.ex5.15 <- f1 =~ y1 + y2 + y3 f2 =~ y4 + y5 + y6 f1 + f2 ~ x1 + x2 + x3 fit <- cfa(model.ex5.15, data=data, group="g", meanstructure=true, group.equal=c("loadings", "intercepts"), group.partial=c("f1=~y3", "y3~1")) summary(fit, standardized=true, fit.measures=true) # ex5.16 Data <- read.table("ex5.16.dat") names(data) <- c("u1","u2","u3","u4","u5","u6","x1","x2","x3","g") Data$u1 <- ordered(data$u1) Data$u2 <- ordered(data$u2) Data$u3 <- ordered(data$u3) Data$u4 <- ordered(data$u4) Data$u5 <- ordered(data$u5) Data$u6 <- ordered(data$u6) model <- f1 =~ u1 + u2 + c(l3,l3b)*u3 f2 =~ u4 + u5 + u6 # mimic f1 + f2 ~ x1 + x2 + x3 # 2 u3 1 u3 c(u3,u3b)*t1 # 2 u3* 1 u3 ~*~ c(1,1)*u3 fit <- cfa(model, data=data, group="g", group.equal=c("loadings","thresholds")) summary(fit, fit.measures=true) # ex5.20 Data <- read.table("ex5.20.dat") names(data) <- paste("y", 1:6, sep="") 45

46 model.ex5.20 <- f1 =~ y1 + lam2*y2 + lam3*y3 f2 =~ y4 + lam5*y5 + lam6*y6 f1 ~~ vf1*f1 + start(1.0)*f1 ## otherwise, neg vf2 f2 ~~ vf2*f2 + start(1.0)*f2 ## y1 ~~ ve1*y1 y2 ~~ ve2*y2 y3 ~~ ve3*y3 y4 ~~ ve4*y4 y5 ~~ ve5*y5 y6 ~~ ve6*y6 # lam2^2*vf1/(lam2^2*vf1 + ve2) == lam5^2*vf2/(lam5^2*vf2 + ve5) lam3*sqrt(vf1)/sqrt(lam3^2*vf1 + ve3) == lam6*sqrt(vf2)/sqrt(lam6^2*vf2 + ve6) ve2 > ve5 ve4 > 0 fit <- cfa(model.ex5.20, data=data, estimator="ml") summary(fit, standardized=true, fit.measures=true).3 6 : # 6.1 Data <- read.table("ex6.1.dat") names(data) <- c("y11","y12","y13","y14") model.ex6.1 <- i =~ 1*y11 + 1*y12 + 1*y13 + 1*y14 s =~ 0*y11 + 1*y12 + 2*y13 + 3*y14 fit <- growth(model.ex6.1, data=data) summary(fit, standardized=true, fit.measures=true) #6.8 Data <- read.table("ex6.8.dat") names(data) <- c("y11","y12","y13","y14") model.ex6.8 <- i =~ 1*y11 + 1*y12 + 1*y13 + 1*y14 s =~ 0*y11 + 1*y12 + start(2)*y13 + start(3)*y14 fit <- growth(model.ex6.8, data=data) summary(fit, standardized=true, fit.measures=true) #6.9 Data <- read.table("ex6.9.dat") names(data) <- c("y11","y12","y13","y14") model.ex6.9 <- i =~ 1*y11 + 1*y12 + 1*y13 + 1*y14 s =~ 0*y11 + 1*y12 + 2*y13 + 3*y14 46

47 q =~ 0*y11 + 1*y12 + 4*y13 + 9*y14 fit <- growth(model.ex6.9, data=data) summary(fit, standardized=true, fit.measures=true) #6.10 Data <- read.table("ex6.10.dat") names(data) <- c("y11","y12","y13","y14","x1","x2","a31","a32","a33","a34") model.ex6.10 <- i =~ 1*y11 + 1*y12 + 1*y13 + 1*y14 s =~ 0*y11 + 1*y12 + 2*y13 + 3*y14 i + s ~ x1 + x2 y11 ~ a31 y12 ~ a32 y13 ~ a33 y14 ~ a34 fit <- growth(model.ex6.10, data=data) summary(fit, standardized=true, fit.measures=true) #6.11 Data <- read.table("ex6.11.dat") names(data) <- c("y1","y2","y3","y4","y5") modelex6.11 <- i =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5 s1 =~ 0*y1 + 1*y2 + 2*y3 + 2*y4 + 2*y5 s2 =~ 0*y1 + 0*y2 + 0*y3 + 1*y4 + 2*y5 fit <- growth(modelex6.11, data=data) summary(fit, standardized=true, fit.measures=true) 47

lavaan Yves Rosseel Department of Data Analysis Ghent University (Belgium) lavaan lavaan cfa sem growth summary coef fitted inspe

lavaan Yves Rosseel Department of Data Analysis Ghent University (Belgium) lavaan lavaan cfa sem growth summary coef fitted inspe lavaan Yves Rosseel Department of Data Analysis Ghent University (Belgium) 2013 7 21 2013 11 12 lavaan lavaan cfa sem growth summary coef fitted inspect 2 lavaan * 1 1 2 2 lavaan 3 3 3 4 1: CFA 5 5 2 10

More information

1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3.

1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3. 1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, 2013. Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3. 2 4, 2. 1 2 2 Depress Conservative. 3., 3,. SES66 Alien67 Alien71,

More information

1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press.

1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. 1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, 2013. Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. 2 3 2 Conservative Depress. 3.1 2. SEM. 1. x SEM. Depress.

More information

1 Stata SEM LightStone 1 5 SEM Stata Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. Introduc

1 Stata SEM LightStone 1 5 SEM Stata Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. Introduc 1 Stata SEM LightStone 1 5 SEM Stata Alan C. Acock, 2013. Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. Introduction to confirmatory factor analysis 9 Stata14 2 1

More information

yamadaiR(cEFA).pdf

yamadaiR(cEFA).pdf R 2012/10/05 Kosugi,E.Koji (Yamadai.R) Categorical Factor Analysis by using R 2012/10/05 1 / 9 Why we use... 3 5 Kosugi,E.Koji (Yamadai.R) Categorical Factor Analysis by using R 2012/10/05 2 / 9 FA vs

More information

(lm) lm AIC 2 / 1

(lm) lm AIC 2 / 1 W707 s-taiji@is.titech.ac.jp 1 / 1 (lm) lm AIC 2 / 1 : y = β 1 x 1 + β 2 x 2 + + β d x d + β d+1 + ϵ (ϵ N(0, σ 2 )) y R: x R d : β i (i = 1,..., d):, β d+1 : ( ) (d = 1) y = β 1 x 1 + β 2 + ϵ (d > 1) y

More information

<4D F736F F F696E74202D2091E63989F1837D815B F A B836093C1985F D816A2E >

<4D F736F F F696E74202D2091E63989F1837D815B F A B836093C1985F D816A2E > 共分散構造分析 マーケティング リサーチ特論 2018.6.11 補助資料 ~ 共分散構造分析 (SEM)~ 2018 年度 1 学期 : 月曜 2 限 担当教員 : 石垣司 共分散構造分析とは? SEM: Structural Equation Modeling 複数の構成概念 ( ) 間の影響を実証 因子分析ではは直交の仮定 演繹的な仮説検証や理論実証に利用 探索的アプローチには不向き CB-SEM

More information

Use R

Use R Use R! 2008/05/23( ) Index Introduction (GLM) ( ) R. Introduction R,, PLS,,, etc. 2. Correlation coefficient (Pearson s product moment correlation) r = Sxy Sxx Syy :, Sxy, Sxx= X, Syy Y 1.96 95% R cor(x,

More information

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99 218 6 219 6.11: (EQS) /EQUATIONS V1 = 30*V999 + 1F1 + E1; V2 = 25*V999 +.54*F1 + E2; V3 = 16*V999 + 1.46*F1 + E3; V4 = 10*V999 + 1F2 + E4; V5 = 19*V999 + 1.29*F2 + E5; V6 = 17*V999 + 2.22*F2 + E6; CALIS.

More information

 

  1 3 1. 5 2. 5 1. 7 2. 10 3. 11 4. 12 1 12 2) 12 5. 14 1 14 2 14 6. 16 1 16 2 21 3 22 7. 23 1 23 2 24 3 25 4 26 5 27 8. 28 1 28 9. 29 1 29 2 29 3 30 4 30 1. 1 31 1) 31 2 31 3 31 4 32 2. 32 3. 32 4. 1 33

More information

1 15 R Part : website:

1 15 R Part : website: 1 15 R Part 4 2017 7 24 4 : website: email: http://www3.u-toyama.ac.jp/kkarato/ kkarato@eco.u-toyama.ac.jp 1 2 2 3 2.1............................... 3 2.2 2................................. 4 2.3................................

More information

k2 ( :35 ) ( k2) (GLM) web web 1 :

k2 ( :35 ) ( k2) (GLM) web   web   1 : 2012 11 01 k2 (2012-10-26 16:35 ) 1 6 2 (2012 11 01 k2) (GLM) kubo@ees.hokudai.ac.jp web http://goo.gl/wijx2 web http://goo.gl/ufq2 1 : 2 2 4 3 7 4 9 5 : 11 5.1................... 13 6 14 6.1......................

More information

講義のーと : データ解析のための統計モデリング. 第3回

講義のーと :  データ解析のための統計モデリング. 第3回 Title 講義のーと : データ解析のための統計モデリング Author(s) 久保, 拓弥 Issue Date 2008 Doc URL http://hdl.handle.net/2115/49477 Type learningobject Note この講義資料は, 著者のホームページ http://hosho.ees.hokudai.ac.jp/~kub ードできます Note(URL)http://hosho.ees.hokudai.ac.jp/~kubo/ce/EesLecture20

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q10-2 テキスト P191 1. 記述統計量 ( 変数 :YY95) 表示変数として 平均 中央値 最大値 最小値 標準偏差 観測値 を選択 A. 都道府県別 Descriptive Statistics for YY95 Categorized by values of PREFNUM Date: 05/11/06 Time: 14:36 Sample: 1990 2002 Included

More information

k3 ( :07 ) 2 (A) k = 1 (B) k = 7 y x x 1 (k2)?? x y (A) GLM (k

k3 ( :07 ) 2 (A) k = 1 (B) k = 7 y x x 1 (k2)?? x y (A) GLM (k 2012 11 01 k3 (2012-10-24 14:07 ) 1 6 3 (2012 11 01 k3) kubo@ees.hokudai.ac.jp web http://goo.gl/wijx2 web http://goo.gl/ufq2 1 3 2 : 4 3 AIC 6 4 7 5 8 6 : 9 7 11 8 12 8.1 (1)........ 13 8.2 (2) χ 2....................

More information

10

10 z c j = N 1 N t= j1 [ ( z t z ) ( )] z t j z q 2 1 2 r j /N j=1 1/ N J Q = N(N 2) 1 N j j=1 r j 2 2 χ J B d z t = z t d (1 B) 2 z t = (z t z t 1 ) (z t 1 z t 2 ) (1 B s )z t = z t z t s _ARIMA CONSUME

More information

28

28 y i = Z i δ i +ε i ε i δ X y i = X Z i δ i + X ε i [ ] 1 δ ˆ i = Z i X( X X) 1 X Z i [ ] 1 σ ˆ 2 Z i X( X X) 1 X Z i Z i X( X X) 1 X y i σ ˆ 2 ˆ σ 2 = [ ] y i Z ˆ [ i δ i ] 1 y N p i Z i δ ˆ i i RSTAT

More information

最小2乗法

最小2乗法 2 2012 4 ( ) 2 2012 4 1 / 42 X Y Y = f (X ; Z) linear regression model X Y slope X 1 Y (X, Y ) 1 (X, Y ) ( ) 2 2012 4 2 / 42 1 β = β = β (4.2) = β 0 + β (4.3) ( ) 2 2012 4 3 / 42 = β 0 + β + (4.4) ( )

More information

X X X Y R Y R Y R MCAR MAR MNAR Figure 1: MCAR, MAR, MNAR Y R X 1.2 Missing At Random (MAR) MAR MCAR MCAR Y X X Y MCAR 2 1 R X Y Table 1 3 IQ MCAR Y I

X X X Y R Y R Y R MCAR MAR MNAR Figure 1: MCAR, MAR, MNAR Y R X 1.2 Missing At Random (MAR) MAR MCAR MCAR Y X X Y MCAR 2 1 R X Y Table 1 3 IQ MCAR Y I (missing data analysis) - - 1/16/2011 (missing data, missing value) (list-wise deletion) (pair-wise deletion) (full information maximum likelihood method, FIML) (multiple imputation method) 1 missing completely

More information

<4D F736F F D20939D8C7689F090CD985F93C18EEA8D758B E646F63>

<4D F736F F D20939D8C7689F090CD985F93C18EEA8D758B E646F63> Gretl OLS omitted variable omitted variable AIC,BIC a) gretl gretl sample file Greene greene8_3 Add Define new variable l_g_percapita=log(g/pop) Pg,Y,Pnc,Puc,Ppt,Pd,Pn,Ps Add logs of selected variables

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q9-1 テキスト P166 2)VAR の推定 注 ) 各変数について ADF 検定を行った結果 和文の次数はすべて 1 である 作業手順 4 情報量基準 (AIC) によるラグ次数の選択 VAR Lag Order Selection Criteria Endogenous variables: D(IG9S) D(IP9S) D(CP9S) Exogenous variables: C Date:

More information

untitled

untitled 2011/6/22 M2 1*1+2*2 79 2F Y YY 0.0 0.2 0.4 0.6 0.8 0.000 0.002 0.004 0.006 0.008 0.010 0.012 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Y 0 50 100 150 200 250 YY A (Y = X + e A ) B (YY = X + e B ) X 0.00 0.05 0.10

More information

DAA09

DAA09 > summary(dat.lm1) Call: lm(formula = sales ~ price, data = dat) Residuals: Min 1Q Median 3Q Max -55.719-19.270 4.212 16.143 73.454 Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) 237.1326

More information

講義のーと : データ解析のための統計モデリング. 第5回

講義のーと :  データ解析のための統計モデリング. 第5回 Title 講義のーと : データ解析のための統計モデリング Author(s) 久保, 拓弥 Issue Date 2008 Doc URL http://hdl.handle.net/2115/49477 Type learningobject Note この講義資料は, 著者のホームページ http://hosho.ees.hokudai.ac.jp/~kub ードできます Note(URL)http://hosho.ees.hokudai.ac.jp/~kubo/ce/EesLecture20

More information

Stata11 whitepapers mwp-037 regress - regress regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F(

Stata11 whitepapers mwp-037 regress - regress regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F( mwp-037 regress - regress 1. 1.1 1.2 1.3 2. 3. 4. 5. 1. regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F( 2, 71) = 69.75 Model 1619.2877 2 809.643849 Prob > F = 0.0000 Residual

More information

こんにちは由美子です

こんにちは由美子です Analysis of Variance 2 two sample t test analysis of variance (ANOVA) CO 3 3 1 EFV1 µ 1 µ 2 µ 3 H 0 H 0 : µ 1 = µ 2 = µ 3 H A : Group 1 Group 2.. Group k population mean µ 1 µ µ κ SD σ 1 σ σ κ sample mean

More information

kubostat2017c p (c) Poisson regression, a generalized linear model (GLM) : :

kubostat2017c p (c) Poisson regression, a generalized linear model (GLM) : : kubostat2017c p.1 2017 (c), a generalized linear model (GLM) : kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2017 11 14 : 2017 11 07 15:43 kubostat2017c (http://goo.gl/76c4i) 2017 (c) 2017 11 14 1 / 47 agenda

More information

kubostat2018d p.2 :? bod size x and fertilization f change seed number? : a statistical model for this example? i response variable seed number : { i

kubostat2018d p.2 :? bod size x and fertilization f change seed number? : a statistical model for this example? i response variable seed number : { i kubostat2018d p.1 I 2018 (d) model selection and kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2018 06 25 : 2018 06 21 17:45 1 2 3 4 :? AIC : deviance model selection misunderstanding kubostat2018d (http://goo.gl/76c4i)

More information

卒業論文

卒業論文 Y = ax 1 b1 X 2 b2...x k bk e u InY = Ina + b 1 InX 1 + b 2 InX 2 +...+ b k InX k + u X 1 Y b = ab 1 X 1 1 b 1 X 2 2...X bk k e u = b 1 (ax b1 1 X b2 2...X bk k e u ) / X 1 = b 1 Y / X 1 X 1 X 1 q YX1

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q3-1-1 テキスト P59 10.8.3.2.1.0 -.1 -.2 10.4 10.0 9.6 9.2 8.8 -.3 76 78 80 82 84 86 88 90 92 94 96 98 R e s i d u al A c tual Fi tte d Dependent Variable: LOG(TAXH) Date: 10/26/05 Time: 15:42 Sample: 1975

More information

4 OLS 4 OLS 4.1 nurseries dual c dual i = c + βnurseries i + ε i (1) 1. OLS Workfile Quick - Estimate Equation OK Equation specification dual c nurser

4 OLS 4 OLS 4.1 nurseries dual c dual i = c + βnurseries i + ε i (1) 1. OLS Workfile Quick - Estimate Equation OK Equation specification dual c nurser 1 EViews 2 2007/5/17 2007/5/21 4 OLS 2 4.1.............................................. 2 4.2................................................ 9 4.3.............................................. 11 4.4

More information

% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti One-sample test of pr

% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti One-sample test of pr 1 1. 2014 6 2014 6 10 10% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti 1029 0.35 0.40 One-sample test of proportion x: Number of obs = 1029 Variable Mean Std.

More information

201711grade2.pdf

201711grade2.pdf 2017 11 26 1 2 28 3 90 4 5 A 1 2 3 4 Web Web 6 B 10 3 10 3 7 34 8 23 9 10 1 2 3 1 (A) 3 32.14 0.65 2.82 0.93 7.48 (B) 4 6 61.30 54.68 34.86 5.25 19.07 (C) 7 13 5.89 42.18 56.51 35.80 50.28 (D) 14 20 0.35

More information

マルチレベル構造方程式 モデリング

マルチレベル構造方程式 モデリング マルチレベル構造方程式 モデリング 京都大学大学院教育学研究科 D2 綾部宏明 2017/06/14( 水 ) 目次 はじめに 1. 目的 2. 個人から 関係 へ回帰分析との違い 3. 共有された関係効力性 4. ペアデータ分析法の問題点 5. ペアデータの分析法 6. マルチレベル構造方程式モデリング 7. 研究の流れ 8. マルチレベル SEM の解析 マルチレベル SEM 解析方法のまとめ

More information

Microsoft Word - StatsDirectMA Web ver. 2.0.doc

Microsoft Word - StatsDirectMA Web ver. 2.0.doc Web version. 2.0 15 May 2006 StatsDirect ver. 2.0 15 May 2006 2 2 2 Meta-Analysis for Beginners by using the StatsDirect ver. 2.0 15 May 2006 Yukari KAMIJIMA 1), Ataru IGARASHI 2), Kiichiro TSUTANI 2)

More information

new_SPSS_4刷はじめから のコピー

new_SPSS_4刷はじめから のコピー iii 1 1 2 4 121 4 122 8 123 8 124 10 125 14 126 17 127 18 128 19 19 20 20 21 ix 129 22 22 25 26 28 29 2 31 32 35 221 35 222 38 223 39 224 42 45 231 45 232 46 233 48 234 49 235 50 236 51 52 241 52 242 55

More information

How to Draw a Beautiful Path Diagram 異文化言語教育評価 担当 :M.S. Goal: A PC tutor conducted a student satisfaction survey. He (She?) wants to know how differen

How to Draw a Beautiful Path Diagram 異文化言語教育評価 担当 :M.S. Goal: A PC tutor conducted a student satisfaction survey. He (She?) wants to know how differen How to Draw a Beautiful Path Diagram Goal: A PC tutor conducted a student satisfaction survey. He (She?) wants to know how different variables lead to the students satisfaction. Make the Diagram: Step

More information

第11回:線形回帰モデルのOLS推定

第11回:線形回帰モデルのOLS推定 11 OLS 2018 7 13 1 / 45 1. 2. 3. 2 / 45 n 2 ((y 1, x 1 ), (y 2, x 2 ),, (y n, x n )) linear regression model y i = β 0 + β 1 x i + u i, E(u i x i ) = 0, E(u i u j x i ) = 0 (i j), V(u i x i ) = σ 2, i

More information

こんにちは由美子です

こんにちは由美子です 1 2 . sum Variable Obs Mean Std. Dev. Min Max ---------+----------------------------------------------------- var1 13.4923077.3545926.05 1.1 3 3 3 0.71 3 x 3 C 3 = 0.3579 2 1 0.71 2 x 0.29 x 3 C 2 = 0.4386

More information

R John Fox R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R

R John Fox R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R R John Fox 2006 8 26 2008 8 28 1 R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R GUI R R R Console > ˆ 2 ˆ Fox(2005) jfox@mcmaster.ca

More information

untitled

untitled IT (1, horiike@ml.me.titech.ac.jp) (1, jun-jun@ms.kagu.tus.ac.jp) 1. 1-1 19802000 2000ITIT IT IT TOPIX (%) 1TOPIX 2 1-2. 80 80 ( ) 2004/11/26 S-PLUS 2 1-3. IT IT IT IT 2. 2-1. a. b. (Size) c. B/M(Book

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q4-1 テキスト P83 多重共線性が発生する回帰 320000 280000 240000 200000 6000 4000 160000 120000 2000 0-2000 -4000 74 76 78 80 82 84 86 88 90 92 94 96 98 R e s i dual A c tual Fi tted Dependent Variable: C90 Date: 10/27/05

More information

kubostat2017b p.1 agenda I 2017 (b) probability distribution and maximum likelihood estimation :

kubostat2017b p.1 agenda I 2017 (b) probability distribution and maximum likelihood estimation : kubostat2017b p.1 agenda I 2017 (b) probabilit distribution and maimum likelihood estimation kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2017 11 14 : 2017 11 07 15:43 1 : 2 3? 4 kubostat2017b (http://goo.gl/76c4i)

More information

講義のーと : データ解析のための統計モデリング. 第2回

講義のーと :  データ解析のための統計モデリング. 第2回 Title 講義のーと : データ解析のための統計モデリング Author(s) 久保, 拓弥 Issue Date 2008 Doc URL http://hdl.handle.net/2115/49477 Type learningobject Note この講義資料は, 著者のホームページ http://hosho.ees.hokudai.ac.jp/~kub ードできます Note(URL)http://hosho.ees.hokudai.ac.jp/~kubo/ce/EesLecture20

More information

σ t σ t σt nikkei HP nikkei4csv H R nikkei4<-readcsv("h:=y=ynikkei4csv",header=t) (1) nikkei header=t nikkei4csv 4 4 nikkei nikkei4<-dataframe(n

σ t σ t σt nikkei HP nikkei4csv H R nikkei4<-readcsv(h:=y=ynikkei4csv,header=t) (1) nikkei header=t nikkei4csv 4 4 nikkei nikkei4<-dataframe(n R 1 R R R tseries fseries 1 tseries fseries R Japan(Tokyo) R library(tseries) library(fseries) 2 t r t t 1 Ω t 1 E[r t Ω t 1 ] ɛ t r t = E[r t Ω t 1 ] + ɛ t ɛ t 2 iid (independently, identically distributed)

More information

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x 80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = n λ x i e λ x i! = λ n x i e nλ n x i! n n log l(λ) = log(λ) x i nλ log( x i!) log l(λ) λ = 1 λ n x i n =

More information

AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t

AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t 87 6.1 AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t 2, V(y t y t 1, y t 2, ) = σ 2 3. Thus, y t y t 1,

More information

Isogai, T., Building a dynamic correlation network for fat-tailed financial asset returns, Applied Network Science (7):-24, 206,

Isogai, T., Building a dynamic correlation network for fat-tailed financial asset returns, Applied Network Science (7):-24, 206, H28. (TMU) 206 8 29 / 34 2 3 4 5 6 Isogai, T., Building a dynamic correlation network for fat-tailed financial asset returns, Applied Network Science (7):-24, 206, http://link.springer.com/article/0.007/s409-06-0008-x

More information

R Console >R ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R R Rcmdr Rcmdr Fox, 2007 Fox and Carvalho, 2012 R R 2

R Console >R ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R R Rcmdr Rcmdr Fox, 2007 Fox and Carvalho, 2012 R R 2 R John Fox Version 1.9-1 2012 9 4 2012 10 9 1 R R Windows R Rcmdr Mac OS X Linux R OS R R , R R Console library(rcmdr)

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q8-1 テキスト P131 Engle-Granger 検定 Dependent Variable: RM2 Date: 11/04/05 Time: 15:15 Sample: 1967Q1 1999Q1 Included observations: 129 RGDP 0.012792 0.000194 65.92203 0.0000 R -95.45715 11.33648-8.420349

More information

Microsoft PowerPoint - 譫礼峩荵

Microsoft PowerPoint - 譫礼峩荵 2011 3 11 323 25 HP 2013 JOC 2014 JOC HP 2014 Go for it 2011 J A 1 2 3 2013bj 2013 Human Welfare 7 1 2015 CiNii 1980 3 1990 17 2000 63 2010 46 2014 7 29 2004 2012 20132007 2003 2003 2002 3 1 20 70 1 2013

More information

Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 s

Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 s BR003 Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 sampsi 47 mwp-044 sdtest 54 mwp-043 signrank/signtest

More information

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM .. ( ) (2) GLMM kubo@ees.hokudai.ac.jp I http://goo.gl/rrhzey 2013 08 27 : 2013 08 27 08:29 kubostat2013ou2 (http://goo.gl/rrhzey) ( ) (2) 2013 08 27 1 / 74 I.1 N k.2 binomial distribution logit link function.3.4!

More information

y i OLS [0, 1] OLS x i = (1, x 1,i,, x k,i ) β = (β 0, β 1,, β k ) G ( x i β) 1 G i 1 π i π i P {y i = 1 x i } = G (

y i OLS [0, 1] OLS x i = (1, x 1,i,, x k,i ) β = (β 0, β 1,, β k ) G ( x i β) 1 G i 1 π i π i P {y i = 1 x i } = G ( 7 2 2008 7 10 1 2 2 1.1 2............................................. 2 1.2 2.......................................... 2 1.3 2........................................ 3 1.4................................................

More information

Microsoft Word - Text_6_STATA_2_Jp_ doc

Microsoft Word - Text_6_STATA_2_Jp_ doc 表示がやや変である (+2E などが買ってに加わっている 3 つの矢印をクリックす変数の正確な値が表示される その正確な値を使って次の式を書くことができる Y = 1571.73+ 258.50 pop 1913. 85 trashbag 以下の SPSS AMOS で算出した価と一致していことを確認してほしい 23 View > Standardized Estimates を選択する すると以下のような標準化係数が得られる

More information

1 R Windows R 1.1 R The R project web R web Download [CRAN] CRAN Mirrors Japan Download and Install R [Windows 9

1 R Windows R 1.1 R The R project web   R web Download [CRAN] CRAN Mirrors Japan Download and Install R [Windows 9 1 R 2007 8 19 1 Windows R 1.1 R The R project web http://www.r-project.org/ R web Download [CRAN] CRAN Mirrors Japan Download and Install R [Windows 95 and later ] [base] 2.5.1 R - 2.5.1 for Windows R

More information

1 2 Windows 7 *3 Windows * 4 R R Console R R Console ˆ R GUI R R R *5 R 2 R R R 6.1 ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R Rconsole R --sdi R M

1 2 Windows 7 *3 Windows * 4 R R Console R R Console ˆ R GUI R R R *5 R 2 R R R 6.1 ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R Rconsole R --sdi R M R John Fox and Milan Bouchet-Valat Version 2.0-1 2013 11 8 2013 11 11 1 R Fox 2005 R R Core Team, 2013 GUI R R R R R R R R R the Comprehensive R Archive Network (CRAN) R CRAN 6.4 R Windows R Rcmdr Mac

More information

計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to wo

計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to wo 計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to worry about perfect multicollinearity in the multiple

More information

lec03

lec03 # Previous inappropriate version tol = 1e-7; grad = 1e10; lambda = 0.2; gamma = 0.9 x = 10; x.hist = x; v = 0 while (abs(grad)>tol){ grad = 2*x+2 v = gamma*v-lambda*grad x = x + v x.hist=c(x.hist,x) print(c(x,grad))

More information

Rによる計量分析:データ解析と可視化 - 第3回 Rの基礎とデータ操作・管理

Rによる計量分析:データ解析と可視化 - 第3回  Rの基礎とデータ操作・管理 R 3 R 2017 Email: gito@eco.u-toyama.ac.jp October 23, 2017 (Toyama/NIHU) R ( 3 ) October 23, 2017 1 / 34 Agenda 1 2 3 4 R 5 RStudio (Toyama/NIHU) R ( 3 ) October 23, 2017 2 / 34 10/30 (Mon.) 12/11 (Mon.)

More information

2015 3

2015 3 2015 3 1 3 1.1................................... 3 1.2................................... 4 2 5 2.1......................... 5 2.2.............. 7 2.3... 7 2.4.................. 9 3 10 3.1..............................

More information

4.9 Hausman Test Time Fixed Effects Model vs Time Random Effects Model Two-way Fixed Effects Model

4.9 Hausman Test Time Fixed Effects Model vs Time Random Effects Model Two-way Fixed Effects Model 1 EViews 5 2007 7 11 2010 5 17 1 ( ) 3 1.1........................................... 4 1.2................................... 9 2 11 3 14 3.1 Pooled OLS.............................................. 14

More information

SEJulyMs更新V7

SEJulyMs更新V7 1 2 ( ) Quantitative Characteristics of Software Process (Is There any Myth, Mystery or Anomaly? No Silver Bullet?) Zenya Koono and Hui Chen A process creates a product. This paper reviews various samples

More information

+深見将志.indd

+深見将志.indd .. A B WHO WHO Danish GOAL GOAL WHO GOAL Hodge et al., a Danish, Bailey. Deci & Ryan Self-determination theory Deci & Ryan. Finkel SEM 1 2 e1 e2 Time,Time Time Time... Ryan & Deci. SEM Time1 Time2 e1 e2

More information

以下の内容について説明する 1. VAR モデル推定する 2. VAR モデルを用いて予測する 3. グレンジャーの因果性を検定する 4. インパルス応答関数を描く 1. VAR モデルを推定する ここでは VAR(p) モデル : R による時系列分析の方法 2 y t = c + Φ 1 y t

以下の内容について説明する 1. VAR モデル推定する 2. VAR モデルを用いて予測する 3. グレンジャーの因果性を検定する 4. インパルス応答関数を描く 1. VAR モデルを推定する ここでは VAR(p) モデル : R による時系列分析の方法 2 y t = c + Φ 1 y t 以下の内容について説明する 1. VAR モデル推定する 2. VAR モデルを用いて予測する 3. グレンジャーの因果性を検定する 4. インパルス応答関数を描く 1. VAR モデルを推定する ここでは VAR(p) モデル : R による時系列分析の方法 2 y t = c + Φ 1 y t 1 + + Φ p y t p + ε t, ε t ~ W.N(Ω), を推定することを考える (

More information

GLM PROC GLM y = Xβ + ε y X β ε ε σ 2 E[ε] = 0 var[ε] = σ 2 I σ 2 0 σ 2 =... 0 σ 2 σ 2 I ε σ 2 y E[y] =Xβ var[y] =σ 2 I PROC GLM

GLM PROC GLM y = Xβ + ε y X β ε ε σ 2 E[ε] = 0 var[ε] = σ 2 I σ 2 0 σ 2 =... 0 σ 2 σ 2 I ε σ 2 y E[y] =Xβ var[y] =σ 2 I PROC GLM PROC MIXED ( ) An Introdunction to PROC MIXED Junji Kishimoto SAS Institute Japan / Keio Univ. SFC / Univ. of Tokyo e-mail address: jpnjak@jpn.sas.com PROC MIXED PROC GLM PROC MIXED,,,, 1 1.1 PROC MIXED

More information

? ( ) () ( [2] [3] [7] ) ( [4, 5] [1] ) (0) (0) ) 1995 SSM 2.4 MANOVA 2 ( 1) ( 2) ( 3) 1)

? ( ) () ( [2] [3] [7] ) ( [4, 5] [1] ) (0) (0) ) 1995 SSM 2.4 MANOVA 2 ( 1) ( 2) ( 3) 1) 6 1 2 2.1 2000 21 42 ( 2000 6 25 ) 1396 202 2000 11 14 60 5 9.0 77% 5 62.1% 1999 6 ? ( ) () ( [2] [3] [7] ) ( [4, 5] [1] ) 2.2 1 (0) (0) 2.3 2 1) 1995 SSM 2.4 MANOVA 2 ( 1) ( 2) ( 3) 1) 1: 3 1 2 163 45

More information

!!! 2!

!!! 2! 2016/5/17 (Tue) SPSS (mugiyama@l.u-tokyo.ac.jp)! !!! 2! 3! 4! !!! 5! (Population)! (Sample) 6! case, observation, individual! variable!!! 1 1 4 2 5 2 1 5 3 4 3 2 3 3 1 4 2 1 4 8 7! (1) (2) (3) (4) categorical

More information

Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestim

Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestim TS001 Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestimation 49 mwp-055 corrgram/ac/pac 56 mwp-009 dfgls

More information

<30315F985F95B65F90B490852E696E6464>

<30315F985F95B65F90B490852E696E6464> Modeling for Change by Latent Difference Score Model: Adapting Process of the Student of Freshman at Half Year Intervals Kazuaki SHIMIZU and Norihiro MIHO Abstract The purpose of this paper is to present

More information

Dependent Variable: LOG(GDP00/(E*HOUR)) Date: 02/27/06 Time: 16:39 Sample (adjusted): 1994Q1 2005Q3 Included observations: 47 after adjustments C -1.5

Dependent Variable: LOG(GDP00/(E*HOUR)) Date: 02/27/06 Time: 16:39 Sample (adjusted): 1994Q1 2005Q3 Included observations: 47 after adjustments C -1.5 第 4 章 この章では 最小二乗法をベースにして 推計上のさまざまなテクニックを検討する 変数のバリエーション 係数の制約係数にあらかじめ制約がある場合がある たとえばマクロの生産関数は 次のように表すことができる 生産要素は資本と労働である 稼動資本は資本ストックに稼働率をかけることで計算でき 労働投入量は 就業者数に総労働時間をかけることで計算できる 制約を掛けずに 推計すると次の結果が得られる

More information

untitled

untitled R 6 1 1 6-1 6,,,,,, &. (2011).., 59(3), 278 294. 2 6-2 3 6-3-1 199 4 A. 57 A1. A2. A3. A4. A5. A6. A7. A8. A9. C. 51 C1. C2. C3. C4. C5. C6. C7. C8. C9. B. 39 B1. B2. B3. B4. B5. D. 52 D1. D2. D3. D4.

More information

こんにちは由美子です

こんにちは由美子です Sample size power calculation Sample Size Estimation AZTPIAIDS AIDSAZT AIDSPI AIDSRNA AZTPr (S A ) = π A, PIPr (S B ) = π B AIDS (sampling)(inference) π A, π B π A - π B = 0.20 PI 20 20AZT, PI 10 6 8 HIV-RNA

More information

kubostat7f p GLM! logistic regression as usual? N? GLM GLM doesn t work! GLM!! probabilit distribution binomial distribution : : β + β x i link functi

kubostat7f p GLM! logistic regression as usual? N? GLM GLM doesn t work! GLM!! probabilit distribution binomial distribution : : β + β x i link functi kubostat7f p statistaical models appeared in the class 7 (f) kubo@eeshokudaiacjp https://googl/z9cjy 7 : 7 : The development of linear models Hierarchical Baesian Model Be more flexible Generalized Linear

More information

JMP V4 による生存時間分析

JMP V4 による生存時間分析 V4 1 SAS 2000.11.18 4 ( ) (Survival Time) 1 (Event) Start of Study Start of Observation Died Died Died Lost End Time Censor Died Died Censor Died Time Start of Study End Start of Observation Censor

More information

(2/24) : 1. R R R

(2/24) : 1. R R R R? http://hosho.ees.hokudai.ac.jp/ kubo/ce/2004/ : kubo@ees.hokudai.ac.jp (2/24) : 1. R 2. 3. R R (3/24)? 1. ( ) 2. ( I ) : (p ) : cf. (power) p? (4/24) p ( ) I p ( ) I? ( ) (5/24)? 0 2 4 6 8 A B A B (control)

More information

035_067_清水_山本.indd

035_067_清水_山本.indd pp. ISSN Big Five Stability and Change of Big Five Measurements by Affective Word Items between Two Waves at Half a Year Interval: Related Inter-individual, State-Trait Anxiety, Self-Esteem Kazuaki SHIMIZU

More information

インターネットを活用した経済分析 - フリーソフト Rを使おう

インターネットを活用した経済分析 - フリーソフト Rを使おう R 1 1 1 2017 2 15 2017 2 15 1/64 2 R 3 R R RESAS 2017 2 15 2/64 2 R 3 R R RESAS 2017 2 15 3/64 2-4 ( ) ( (80%) (20%) 2017 2 15 4/64 PC LAN R 2017 2 15 5/64 R R 2017 2 15 6/64 3-4 R 15 + 2017 2 15 7/64

More information

(X) (Y ) Y = intercept + c X + e (1) e c c M = intercept + ax + e (2) a Y = intercept + cx + bm + e (3) (1) X c c c (3) b X M Y (indirect effect) a b

(X) (Y ) Y = intercept + c X + e (1) e c c M = intercept + ax + e (2) a Y = intercept + cx + bm + e (3) (1) X c c c (3) b X M Y (indirect effect) a b 21 12 23 (mediation analysis) Figure 1 X Y M (mediator) mediation model Baron and Kenny (1986) 1 1) mediated moderation ( moderated mediation) 2) (multilevel mediation model) a M b X c (c ) Y 1: 1 1.1

More information

.. est table TwoSLS1 TwoSLS2 GMM het,b(%9.5f) se Variable TwoSLS1 TwoSLS2 GMM_het hi_empunion totchr

.. est table TwoSLS1 TwoSLS2 GMM het,b(%9.5f) se Variable TwoSLS1 TwoSLS2 GMM_het hi_empunion totchr 3,. Cameron and Trivedi (2010) Microeconometrics Using Stata, Revised Edition, Stata Press 6 Linear instrumentalvariables regression 9 Linear panel-data models: Extensions.. GMM xtabond., GMM(Generalized

More information

R分散分析06.indd

R分散分析06.indd http://cse.niaes.affrc.go.jp/minaka/r/r-top.html > mm mm TRT DATA 1 DM1 2537 2 DM1 2069 3 DM1 2104 4 DM1 1797 5 DM2 3366 6 DM2 2591 7 DM2 2211 8 DM2

More information

54_2-05-地方会.indd

54_2-05-地方会.indd 82 58 59 21 83 84 2 9 4 85 86 1. 87 6 88 89 β 1 90 2 3 p 4 t 5 6 EQ 91 7 8 9 1 10 2 92 11 3 12 13 IT p 14 93 15 16 ACTIVE 17 18 94 p p p 19 20 21 22 95 23 24 25 2 26 β β 96 27 1 28 29 30 97 31 32 33 1

More information

療養病床に勤務する看護職の職務関与の構造分析

療養病床に勤務する看護職の職務関与の構造分析 原著 :. JDS Job Diagnostic SurveyHackman & OldhamStamps, Herzberg Ⅰ. 諸言,, 10.,, 11 Ⅱ. 方法 1. 概念枠組みと質問紙の測定尺度 Hackman & Oldham Hackman & Oldham JDS 内発的動機づけ職務特性 技能多様性 タスク明確性 タスク重要性 自律性 職務からのフィードバック 他者からのフィードバック

More information

Mantel-Haenszelの方法

Mantel-Haenszelの方法 Mantel-Haenszel 2008 6 12 ) 2008 6 12 1 / 39 Mantel & Haenzel 1959) Mantel N, Haenszel W. Statistical aspects of the analysis of data from retrospective studies of disease. J. Nat. Cancer Inst. 1959; 224):

More information

3 HLM High School and Beyond HLM6 HLM6 C: Program Files HLM6S 2 C: Program MATHACH Files HLM6S Examples AppendxA school SECTOR Socio-Economic

3 HLM High School and Beyond HLM6 HLM6 C: Program Files HLM6S 2 C: Program MATHACH Files HLM6S Examples AppendxA school SECTOR Socio-Economic 1 2006 5 26 1 S. W. Raudenbush HLM6 student edition SAS/STAT MIXED R 2 HLM6 HLM HLM Hierarchical Linear A. S. Bryk S. W. Raudenbush Models HLM SSI *1 HLM6 student edition *2 student edition HLM6 (1) GUI

More information

J1順位と得点者数の関係分析

J1順位と得点者数の関係分析 2015 年度 S-PLUS & Visual R Platform 学生研究奨励賞応募 J1 順位と得点者数の関係分析 -J リーグの得点数の現状 - 目次 1. はじめに 2. 研究目的 データについて 3.J1 リーグの得点数の現状 4. 分析 5. まとめ 6. 今後の課題 - 参考文献 - 東海大学情報通信学部 経営システム工学科 山田貴久 1. はじめに 1993 年 5 月 15 日に

More information

Stata User Group Meeting in Kyoto / ( / ) Stata User Group Meeting in Kyoto / 21

Stata User Group Meeting in Kyoto / ( / ) Stata User Group Meeting in Kyoto / 21 Stata User Group Meeting in Kyoto / 2017 9 16 ( / ) Stata User Group Meeting in Kyoto 2017 9 16 1 / 21 Rosenbaum and Rubin (1983) logit/probit, ATE = E [Y 1 Y 0 ] ( / ) Stata User Group Meeting in Kyoto

More information

66-1 田中健吾・松浦紗織.pwd

66-1 田中健吾・松浦紗織.pwd Abstract The aim of this study was to investigate the characteristics of a psychological stress reaction scale for home caregivers, using Item Response Theory IRT. Participants consisted of 337 home caregivers

More information

st.dvi

st.dvi 9 3 5................................... 5............................. 5....................................... 5.................................. 7.........................................................................

More information

2014ESJ.key

2014ESJ.key http://www001.upp.so-net.ne.jp/ito-hi/stat/2014esj/ Statistical Software for State Space Models Commandeur et al. (2011) Journal of Statistical Software 41(1) State Space Models in R Petris & Petrone (2011)

More information

現代日本論演習/比較現代日本論研究演習I「統計分析の基礎」

現代日本論演習/比較現代日本論研究演習I「統計分析の基礎」 URL: http://tsigeto.info/statg/ I ( ) 3 2017 2 ( 7F) 1 : (1) ; (2) 1998 (70 20% 6 8 ) (30%) ( 2) ( 2) 2 1. (4/13) 2. SPSS (4/20) 3. (4/27) [ ] 4. (5/11 6/1) [1, 4 ] 5. (6/8) 6. (6/15 6/29) [2, 5 ] 7. (7/6

More information

BMIdata.txt DT DT <- read.table("bmidata.txt") DT head(dt) names(dt) str(dt)

BMIdata.txt DT DT <- read.table(bmidata.txt) DT head(dt) names(dt) str(dt) ?read.table read.table(file, header = FALSE, sep = "", quote = "\" ", dec = ".", numerals = c("allow.loss", "warn.loss", "no.loss"), row.names, col.names, as.is =!stringsasfactors, na.strings = "NA", colclasses

More information

p.1/22

p.1/22 p.1/22 & & & & Excel / p.2/22 & & & & Excel / p.2/22 ( ) ( ) p.3/22 ( ) ( ) Baldi Web p.3/22 ( ) ( ) Baldi Web ( ) ( ) ( p.3/22 ) Text Mining for Clementine True Teller Text Mining Studio Text Miner Trustia

More information

1.3 Structure of Language ability The inconsistent relationships between listening and reading skills found across studies lead us to hypothesize as f

1.3 Structure of Language ability The inconsistent relationships between listening and reading skills found across studies lead us to hypothesize as f 5/23 In nami, Y., & Koizumi, R. (2011). Factor structure of the revised TOEIC test: A multiple-sample analysis. Language Testing, 29, 131-152. Abstract This study examined the factor structure of the listening

More information

ECCS. ECCS,. ( 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e

ECCS. ECCS,. (  2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e 1 1 2015 4 6 1. ECCS. ECCS,. (https://ras.ecc.u-tokyo.ac.jp/guacamole/) 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file editor, Do View Do-file Editor Execute(do). 3. Mac System

More information

R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッ

R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッ R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッケージが用意されており それぞれ分析の目的に応じて標準の R にパッケージを追加していくことになる インターネットに接続してあるパソコンで

More information

A Nutritional Study of Anemia in Pregnancy Hematologic Characteristics in Pregnancy (Part 1) Keizo Shiraki, Fumiko Hisaoka Department of Nutrition, Sc

A Nutritional Study of Anemia in Pregnancy Hematologic Characteristics in Pregnancy (Part 1) Keizo Shiraki, Fumiko Hisaoka Department of Nutrition, Sc A Nutritional Study of Anemia in Pregnancy Hematologic Characteristics in Pregnancy (Part 1) Keizo Shiraki, Fumiko Hisaoka Department of Nutrition, School of Medicine, Tokushima University, Tokushima Fetal

More information

統計研修R分散分析(追加).indd

統計研修R分散分析(追加).indd http://cse.niaes.affrc.go.jp/minaka/r/r-top.html > mm mm TRT DATA 1 DM1 2537 2 DM1 2069 3 DM1 2104 4 DM1 1797 5 DM2 3366 6 DM2 2591 7 DM2 2211 8

More information

こんにちは由美子です

こんにちは由美子です 1 2 λ 3 λ λ. correlate father mother first second (obs=20) father mother first second ---------+------------------------------------ father 1.0000 mother 0.2254 1.0000 first 0.7919 0.5841 1.0000 second

More information