r:path_analysis
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| r:path_analysis [2024/10/30 03:27] – hkimscil | r:path_analysis [2024/11/04 01:28] (current) – [Introduction] hkimscil | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| * The number of unique (non-redundent) source of information | * The number of unique (non-redundent) source of information | ||
| * $p(p+1)/2$ | * $p(p+1)/2$ | ||
| - | | + | |
| - | * Just-identified (df = 0) | + | * Just-identified (df = 0) |
| - | * Model can be estimated, but cannot be assessed | + | * Model can be estimated, but cannot be assessed |
| - | * Over-identified (df > 0) | + | * Over-identified (df > 0) |
| - | * Model can be estimated and assessed | + | * Model can be estimated and assessed |
| - | * Under-identified (df < 0) | + | * Under-identified (df < 0) |
| - | * Model cannot be either estimated or assessed | + | * Model cannot be either estimated or assessed |
| * Exogenous and | * Exogenous and | ||
| Line 555: | Line 555: | ||
| ===== Lavaan in R: explanation ===== | ===== Lavaan in R: explanation ===== | ||
| - | |||
| {{youtube> | {{youtube> | ||
| Path analysis in R with Lavaan (introduction) | Path analysis in R with Lavaan (introduction) | ||
| Line 660: | Line 659: | ||
| * Note: Modification indices represent the expected decrease in model chi-square after freeing a given parameter (Schumacker & Lomax, 2004). The EPC is an estimate of the model parameter itself. A MI value of 3.84 or greater may be considered " | * Note: Modification indices represent the expected decrease in model chi-square after freeing a given parameter (Schumacker & Lomax, 2004). The EPC is an estimate of the model parameter itself. A MI value of 3.84 or greater may be considered " | ||
| - | ----------------------------- | + | output |
| - | * Specification of model using auto.var argument... | + | |
| - | < | + | |
| - | # model specification | + | |
| - | + | ||
| - | model< | + | |
| - | # equation where interest is predicted by ses & mastery and | + | |
| - | # performance goals | + | |
| - | interest ~ mastery + perfgoal + ses | + | |
| - | + | ||
| - | # equation where achieve is predicted by interest and anxiety | + | |
| - | achieve~anxiety+interest+mastery | + | |
| - | + | ||
| - | #equation where anxiety is predicted by mastery and performance goals | + | |
| - | anxiety~perfgoal+mastery | + | |
| - | + | ||
| - | # estimtating the variances of the exogenous variables (ses, mastery, | + | |
| - | mastery~~mastery | + | |
| - | perfgoal~~perfgoal | + | |
| - | ses~~ses | + | |
| - | + | ||
| - | # estimtating the covariances of the exogenous variables (ses, mastery, | + | |
| - | mastery~~perfgoal+ses | + | |
| - | perfgoal~~ses | + | |
| - | + | ||
| - | # The auto.var argument when fitting the model can be used so that | + | |
| - | # you do not have to directly request estimation of residual variances | + | |
| - | + | ||
| - | # Estimating the covariance of residuals for interest and anxiety | + | |
| - | interest~~anxiety' | + | |
| - | + | ||
| - | fit< | + | |
| - | summary(fit, | + | |
| - | </ | + | |
| < | < | ||
| - | > ###################################################### | + | > # install.packages(" |
| - | > ## data file: PlannedBehavior.csv | + | |
| - | > ###################################################### | + | |
| - | > ###################################################### | + | |
| - | > install.packages(" | + | |
| - | ‘C:/ | + | |
| - | (왜냐하면 ‘lib’가 지정되지 않았기 때문입니다) | + | |
| - | URL ' | + | |
| - | Content type ' | + | |
| - | downloaded 1.1 MB | + | |
| - | + | ||
| - | 패키지 ‘readr’를 성공적으로 압축해제하였고 MD5 sums 이 확인되었습니다 | + | |
| - | + | ||
| - | 다운로드된 바이너리 패키지들은 다음의 위치에 있습니다 | + | |
| - | C: | + | |
| - | > library(readr) | + | |
| - | 경고메시지(들): | + | |
| - | 패키지 ‘readr’는 R 버전 4.3.3에서 작성되었습니다 | + | |
| - | > df <- read.csv(" | + | |
| - | > head(df) | + | |
| - | attitude norms control intention behavior | + | |
| - | 1 | + | |
| - | 2 | + | |
| - | 3 | + | |
| - | 4 | + | |
| - | 5 | + | |
| - | 6 | + | |
| - | > str(df) | + | |
| - | ' | + | |
| - | $ attitude : num 2.31 4.66 3.85 4.24 2.91 2.99 3.96 3.01 4.77 3.67 ... | + | |
| - | $ norms : num 2.31 4.01 3.56 2.25 3.31 2.51 4.65 2.98 3.09 3.63 ... | + | |
| - | $ control | + | |
| - | $ intention: num 2.5 3.99 4.35 1.51 1.45 2.59 4.08 2.58 4.87 3.09 ... | + | |
| - | $ behavior : num 2.62 3.64 3.83 2.25 2 2.2 4.41 4.15 4.35 3.95 ... | + | |
| - | > # specifying path analysis model | + | |
| - | > # by using lavann package | + | |
| - | > install.packages(" | + | |
| - | ‘C:/ | + | |
| - | (왜냐하면 ‘lib’가 지정되지 않았기 때문입니다) | + | |
| - | Warning in install.packages : | + | |
| - | package ‘lavann’ is not available for this version of R | + | |
| - | + | ||
| - | A version of this package for your version of R might be available elsewhere, | + | |
| - | see the ideas at | + | |
| - | https:// | + | |
| - | > # specifying path analysis model | + | |
| - | > # by using lavann package | + | |
| - | > # install.packages(" | + | |
| - | > library(lavaan) | + | |
| - | This is lavaan 0.6-16 | + | |
| - | lavaan is FREE software! Please report any bugs. | + | |
| - | > specmod <- " | + | |
| - | + # path c | + | |
| - | + # identifying path c (prime) by putting c* | + | |
| - | + | + | |
| - | + | + | |
| - | + # path a | + | |
| - | + | + | |
| - | + | + | |
| - | + # path b | + | |
| - | + | + | |
| - | + | + | |
| - | + # indirect effect (a*b): Sobel test (Delta Method) | + | |
| - | + # 간접효과 a path x b path 를 구해서 얻음 | + | |
| - | + # sobel test 라 부름 | + | |
| - | + ab := a*b | + | |
| - | + " | + | |
| - | > # Fit/ | + | |
| - | > fitmod <- sem(specmod, | + | |
| - | > # summarize the model | + | |
| - | > summary(fitmod, | + | |
| - | lavaan 0.6.16 ended normally after 1 iteration | + | |
| - | + | ||
| - | Estimator | + | |
| - | Optimization method | + | |
| - | Number of model parameters | + | |
| - | + | ||
| - | Number of observations | + | |
| - | + | ||
| - | Model Test User Model: | + | |
| - | + | ||
| - | Test statistic | + | |
| - | Degrees of freedom | + | |
| - | + | ||
| - | Model Test Baseline Model: | + | |
| - | + | ||
| - | Test statistic | + | |
| - | Degrees of freedom | + | |
| - | P-value | + | |
| - | + | ||
| - | User Model versus Baseline Model: | + | |
| - | + | ||
| - | Comparative Fit Index (CFI) 1.000 | + | |
| - | Tucker-Lewis Index (TLI) | + | |
| - | + | ||
| - | Loglikelihood and Information Criteria: | + | |
| - | + | ||
| - | Loglikelihood user model (H0) | + | |
| - | Loglikelihood unrestricted model (H1) | + | |
| - | + | ||
| - | Akaike (AIC) | + | |
| - | Bayesian (BIC) | + | |
| - | Sample-size adjusted Bayesian (SABIC) | + | |
| - | + | ||
| - | Root Mean Square Error of Approximation: | + | |
| - | + | ||
| - | RMSEA 0.000 | + | |
| - | 90 Percent confidence interval - lower | + | |
| - | 90 Percent confidence interval - upper | + | |
| - | P-value H_0: RMSEA <= 0.050 NA | + | |
| - | P-value H_0: RMSEA >= 0.080 NA | + | |
| - | + | ||
| - | Standardized Root Mean Square Residual: | + | |
| - | + | ||
| - | SRMR | + | |
| - | + | ||
| - | Parameter Estimates: | + | |
| - | + | ||
| - | Standard errors | + | |
| - | Information | + | |
| - | Information saturated (h1) model Structured | + | |
| - | + | ||
| - | Regressions: | + | |
| - | | + | |
| - | behavior ~ | + | |
| - | attitude | + | |
| - | intention ~ | + | |
| - | attitude | + | |
| - | behavior ~ | + | |
| - | intention | + | |
| - | + | ||
| - | Variances: | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | R-Square: | + | |
| - | | + | |
| - | behavior | + | |
| - | intention | + | |
| - | + | ||
| - | Defined Parameters: | + | |
| - | | + | |
| - | ab 0.212 0.044 4.778 0.000 | + | |
| - | + | ||
| - | > ########################################## | + | |
| - | > # boot strapping instead of sobel test | + | |
| - | > ########################################## | + | |
| - | > set.seed(101) | + | |
| - | > fitmod2 <- sem(specmod, | + | |
| - | + se=" | + | |
| - | + bootstrap=100) | + | |
| - | > summary(fitmod2, | + | |
| - | lavaan 0.6.16 ended normally after 1 iteration | + | |
| - | + | ||
| - | Estimator | + | |
| - | Optimization method | + | |
| - | Number of model parameters | + | |
| - | + | ||
| - | Number of observations | + | |
| - | + | ||
| - | Model Test User Model: | + | |
| - | + | ||
| - | Test statistic | + | |
| - | Degrees of freedom | + | |
| - | + | ||
| - | Model Test Baseline Model: | + | |
| - | + | ||
| - | Test statistic | + | |
| - | Degrees of freedom | + | |
| - | P-value | + | |
| - | + | ||
| - | User Model versus Baseline Model: | + | |
| - | + | ||
| - | Comparative Fit Index (CFI) 1.000 | + | |
| - | Tucker-Lewis Index (TLI) | + | |
| - | + | ||
| - | Loglikelihood and Information Criteria: | + | |
| - | + | ||
| - | Loglikelihood user model (H0) | + | |
| - | Loglikelihood unrestricted model (H1) | + | |
| - | + | ||
| - | Akaike (AIC) | + | |
| - | Bayesian (BIC) | + | |
| - | Sample-size adjusted Bayesian (SABIC) | + | |
| - | + | ||
| - | Root Mean Square Error of Approximation: | + | |
| - | + | ||
| - | RMSEA 0.000 | + | |
| - | 90 Percent confidence interval - lower | + | |
| - | 90 Percent confidence interval - upper | + | |
| - | P-value H_0: RMSEA <= 0.050 NA | + | |
| - | P-value H_0: RMSEA >= 0.080 NA | + | |
| - | + | ||
| - | Standardized Root Mean Square Residual: | + | |
| - | + | ||
| - | SRMR | + | |
| - | + | ||
| - | Parameter Estimates: | + | |
| - | + | ||
| - | Standard errors | + | |
| - | Number of requested bootstrap draws 100 | + | |
| - | Number of successful bootstrap draws 100 | + | |
| - | + | ||
| - | Regressions: | + | |
| - | | + | |
| - | behavior ~ | + | |
| - | attitude | + | |
| - | intention ~ | + | |
| - | attitude | + | |
| - | behavior ~ | + | |
| - | intention | + | |
| - | + | ||
| - | Variances: | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | R-Square: | + | |
| - | | + | |
| - | behavior | + | |
| - | intention | + | |
| - | + | ||
| - | Defined Parameters: | + | |
| - | | + | |
| - | ab 0.212 0.046 4.639 0.000 | + | |
| - | + | ||
| - | > parameterEstimates(fitmod2, | + | |
| - | + ci=TRUE, level=.95, | + | |
| - | + boot.ci.type=" | + | |
| - | lhs op rhs label | + | |
| - | 1 behavior | + | |
| - | 2 intention | + | |
| - | 3 behavior | + | |
| - | 4 behavior ~~ behavior | + | |
| - | 5 intention ~~ intention | + | |
| - | 6 attitude ~~ attitude | + | |
| - | 7 ab := | + | |
| - | > | + | |
| - | > | + | |
| - | > | + | |
| - | > ############################# | + | |
| - | > # poking 둘러보기 | + | |
| - | > # 모델 = | + | |
| - | > # a Intention | + | |
| - | > # Attitude | + | |
| - | > # | + | |
| - | > lm.ba.01 <- lm(behavior~attitude+intention, | + | |
| - | > lm.ba.02 <- lm(behavior~intention, | + | |
| - | > lm.ba.03 <- lm(intention~attitude, | + | |
| - | > lm.ba.04 <- lm(attitude~intention, | + | |
| - | > lm.ba.05 <- lm(behavior~attitude, | + | |
| - | > | + | |
| - | > summary(lm.ba.05) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ attitude, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -1.96792 -0.62906 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | attitude | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.9087 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > summary(lm.ba.01) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ attitude + intention, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -2.01916 -0.57280 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | attitude | + | |
| - | intention | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.8419 on 196 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > names(lm.ba.03) | + | |
| - | [1] " | + | |
| - | [5] " | + | |
| - | [9] " | + | |
| - | > reg.int <- lm.ba.03$fitted.values - mean(df$intention) | + | |
| - | > res.int <- summary(lm.ba.03)$residuals | + | |
| - | > # just checking | + | |
| - | > sum(reg.int^2) + sum(res.int^2) | + | |
| - | [1] 167.2277 | + | |
| - | > var(df$intention)*(length(df$intention)-1) | + | |
| - | [1] 167.2277 | + | |
| - | > # the intention part contributed by attitudes | + | |
| - | > # is it explaing behavior too? | + | |
| - | > lm.ba.021 <- lm(behavior~reg.int, | + | |
| - | > summary(lm.ba.021) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ reg.int, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -1.96792 -0.62906 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | reg.int | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.9087 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > int.all <- res.int + reg.int | + | |
| - | > lm.temp <- lm(behavior~int.all, | + | |
| - | > summary(lm.temp) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ int.all, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -2.03770 -0.55555 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | int.all | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.8401 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > summary(lm.ba.02) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ intention, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -2.03770 -0.55555 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | intention | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.8401 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > summary(lm.ba.021) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ reg.int, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -1.96792 -0.62906 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | reg.int | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.9087 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > summary(lm.ba.022) | + | |
| - | h(simpleError(msg, | + | |
| - | 함수 ' | + | |
| - | > # the pure intention part excluding | + | |
| - | > # what attitude contributes | + | |
| - | > lm.ba.022 <- lm(behavior~res.int, | + | |
| - | > summary(lm.ba.022) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ res.int, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -1.94981 -0.57202 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | res.int | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.8716 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > summary(lm.ba.022) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ res.int, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -1.94981 -0.57202 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | res.int | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.8716 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > # intention - behavior part | + | |
| - | > summary(lm.ba.02)$r.squared | + | |
| - | [1] 0.1982297 | + | |
| - | > # K - attitudes 가 intention을 설명해 주는 부분 (regression error) | + | |
| - | > summary(lm.ba.021)$r.squared | + | |
| - | [1] 0.06197255 | + | |
| - | > # J - attitudes 가 설명하지 못하는 부분 (residual error) | + | |
| - | > summary(lm.ba.022)$r.squared | + | |
| - | [1] 0.1369399 | + | |
| - | > # 위에서 intention은 K와 J로 이루어져 있다. 이를 확인하는 것 | + | |
| - | > summary(lm.ba.021)$r.squared + summary(lm.ba.022)$r.squared | + | |
| - | [1] 0.1989125 | + | |
| - | > | + | |
| - | > # lm.ba.04 <- lm(attitude~intention, | + | |
| - | > res.temp <- lm.ba.04$residuals | + | |
| - | > lm.temp <- lm(behavior~res.temp, | + | |
| - | > summary(lm.temp) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ res.temp, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -2.11381 -0.61542 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | res.temp | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.9379 on 197 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > summary(lm.ba.01) | + | |
| - | + | ||
| - | Call: | + | |
| - | lm(formula = behavior ~ attitude + intention, data = df) | + | |
| - | + | ||
| - | Residuals: | + | |
| - | | + | |
| - | -2.01916 -0.57280 | + | |
| - | + | ||
| - | Coefficients: | + | |
| - | Estimate Std. Error t value Pr(> | + | |
| - | (Intercept) | + | |
| - | attitude | + | |
| - | intention | + | |
| - | --- | + | |
| - | Signif. codes: | + | |
| - | + | ||
| - | Residual standard error: 0.8419 on 196 degrees of freedom | + | |
| - | Multiple R-squared: | + | |
| - | F-statistic: | + | |
| - | + | ||
| - | > | + | |
| - | > | + | |
| - | > abc <- summary(lm.ba.01)$r.square | + | |
| - | > ab <- summary(lm.ba.02)$r.square | + | |
| - | > bc <- summary(lm.ba.05)$r.square | + | |
| - | > abc | + | |
| - | [1] 0.1989125 | + | |
| - | > abbc <- ab + bc | + | |
| - | > ab | + | |
| - | [1] 0.1982297 | + | |
| - | > bc | + | |
| - | [1] 0.06197255 | + | |
| - | > a <- abc - bc | + | |
| - | > abbc <- ab + bc | + | |
| - | > abbc | + | |
| - | [1] 0.2602023 | + | |
| - | > b <- abbc - abc | + | |
| - | > b | + | |
| - | [1] 0.0612898 | + | |
| - | > a | + | |
| - | [1] 0.1369399 | + | |
| - | > c | + | |
| - | function (...) .Primitive(" | + | |
| - | > c <- abc - ab | + | |
| - | > c | + | |
| - | [1] 0.0006827583 | + | |
| - | > install.packages(" | + | |
| - | 에러: 예상하지 못한 기호(symbol)입니다. in " | + | |
| > | > | ||
| > # processdata< | > # processdata< | ||
| > processdata< | > processdata< | ||
| + header=TRUE, | + header=TRUE, | ||
| + | > | ||
| > str(processdata) | > str(processdata) | ||
| ' | ' | ||
| Line 1234: | Line 680: | ||
| $ pgoal_MS: int 0 0 1 1 0 1 0 1 0 0 ... | $ pgoal_MS: int 0 0 1 1 0 1 0 1 0 0 ... | ||
| > library(lavaan) | > library(lavaan) | ||
| + | > | ||
| > # model specification | > # model specification | ||
| > model <- ' | > model <- ' | ||
| Line 1268: | Line 715: | ||
| + # for interest and anxiety | + # for interest and anxiety | ||
| + | + | ||
| + | > | ||
| > fit< | > fit< | ||
| > summary(fit, | > summary(fit, | ||
| Line 1447: | Line 895: | ||
| achieve | achieve | ||
| - | > | + | > |
| + | > parameterEstimates(fit) | ||
| + | lhs op rhs est se z pvalue ci.lower ci.upper | ||
| + | 1 interest | ||
| + | 2 interest | ||
| + | 3 interest | ||
| + | 4 | ||
| + | 5 | ||
| + | 6 | ||
| + | 7 | ||
| + | 8 | ||
| + | 9 | ||
| + | 10 perfgoal ~~ perfgoal | ||
| + | 11 ses ~~ ses 0.249 0.030 8.367 0.000 0.191 0.308 | ||
| + | 12 mastery ~~ perfgoal -0.935 0.361 -2.590 | ||
| + | 13 mastery ~~ ses 0.170 0.061 2.805 0.005 0.051 0.288 | ||
| + | 14 perfgoal ~~ ses -0.226 0.128 -1.768 | ||
| + | 15 interest ~~ interest | ||
| + | 16 anxiety ~~ anxiety | ||
| + | 17 achieve ~~ achieve | ||
| + | 18 interest ~~ anxiety | ||
| + | > fitMeasures(fit) | ||
| + | | ||
| + | | ||
| + | | ||
| + | 3.000 | ||
| + | baseline.df | ||
| + | | ||
| + | tli nnfi rfi | ||
| + | 0.300 | ||
| + | nfi pnfi ifi | ||
| + | 0.856 | ||
| + | rni logl | ||
| + | 0.860 | ||
| + | aic | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 0.336 | ||
| + | | ||
| + | 0.050 | ||
| + | rmr rmr_nomean | ||
| + | 0.122 | ||
| + | | ||
| + | 0.074 | ||
| + | crmr_nomean | ||
| + | 0.088 | ||
| + | cn_05 | ||
| + | | ||
| + | | ||
| + | 0.587 | ||
| + | ecvi | ||
| + | 0.466 | ||
| + | > modificationIndices(fit) | ||
| + | lhs op rhs | ||
| + | 19 interest ~~ achieve 25.396 -2.899 | ||
| + | 23 achieve ~~ anxiety | ||
| + | 24 achieve ~~ mastery 22.476 -1.743 | ||
| + | 25 achieve ~~ perfgoal | ||
| + | 26 achieve ~~ ses 20.541 | ||
| + | 27 anxiety ~~ mastery | ||
| + | 28 anxiety ~~ perfgoal | ||
| + | 29 anxiety ~~ ses 0.921 -0.061 | ||
| + | 30 interest | ||
| + | 32 achieve | ||
| + | 33 achieve | ||
| + | 34 anxiety | ||
| + | 35 anxiety | ||
| + | 36 anxiety | ||
| + | 37 mastery | ||
| + | 38 mastery | ||
| + | 39 mastery | ||
| + | 43 perfgoal | ||
| + | 44 perfgoal | ||
| + | 47 ses ~ interest | ||
| + | 48 ses ~ achieve 20.964 | ||
| + | 49 ses ~ anxiety | ||
| + | > | ||
| + | > | ||
| </ | </ | ||
| + | |||
| + | ----------------------------- | ||
| + | * Specification of model using auto.var argument... | ||
| + | < | ||
| + | # model specification | ||
| + | |||
| + | model< | ||
| + | # equation where interest is predicted by ses & mastery and | ||
| + | # performance goals | ||
| + | interest ~ mastery + perfgoal + ses | ||
| + | |||
| + | # equation where achieve is predicted by interest and anxiety | ||
| + | achieve~anxiety+interest+mastery | ||
| + | |||
| + | #equation where anxiety is predicted by mastery and performance goals | ||
| + | anxiety~perfgoal+mastery | ||
| + | |||
| + | # estimtating the variances of the exogenous variables (ses, mastery, | ||
| + | mastery~~mastery | ||
| + | perfgoal~~perfgoal | ||
| + | ses~~ses | ||
| + | |||
| + | # estimtating the covariances of the exogenous variables (ses, mastery, | ||
| + | mastery~~perfgoal+ses | ||
| + | perfgoal~~ses | ||
| + | |||
| + | # The auto.var argument when fitting the model can be used so that | ||
| + | # you do not have to directly request estimation of residual variances | ||
| + | |||
| + | # Estimating the covariance of residuals for interest and anxiety | ||
| + | interest~~anxiety' | ||
| + | |||
| + | fit< | ||
| + | summary(fit, | ||
| + | </ | ||
| * There are a couple of ways you can obtain path diagrams (although they can be somewhat tricky to implement. | * There are a couple of ways you can obtain path diagrams (although they can be somewhat tricky to implement. | ||
r/path_analysis.1730258849.txt.gz · Last modified: by hkimscil
