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 [2022/11/16 22:37] – [Lavaan 3: Testing data normality] hkimscil | r:path_analysis [2023/11/27 16:57] (current) – [Lavaan in R: explanation] hkimscil | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Path Analysis ====== | ====== Path Analysis ====== | ||
+ | {{: | ||
====== Introduction ====== | ====== Introduction ====== | ||
{{youtube> | {{youtube> | ||
Line 114: | Line 115: | ||
# my own | # my own | ||
# pbt model | # pbt model | ||
- | specmod5 <- " | + | specmod5 <- ' |
# Directional relations (path) | # Directional relations (path) | ||
- | intention ~ attitude + norms + control | + | intention ~ a*attitude + b*norms + c*control |
- | behavior ~ intention | + | behavior ~ d*intention |
# Covariances | # Covariances | ||
attitude ~~ norms + control | attitude ~~ norms + control | ||
norms ~~ control | norms ~~ control | ||
- | " | + | ad := a*d |
+ | bd := b*d | ||
+ | cd := c*d | ||
+ | ' | ||
fitmod5 <- sem(specmod5, | fitmod5 <- sem(specmod5, | ||
summary(fitmod5, | summary(fitmod5, | ||
Line 629: | Line 633: | ||
* Step 2: Use ' | * Step 2: Use ' | ||
< | < | ||
- | fit< | + | fit< |
</ | </ | ||
* The ' | * The ' | ||
< | < | ||
- | summary(fit, | + | summary(fit, |
</ | </ | ||
* To obtain standardized estimates, use the ' | * To obtain standardized estimates, use the ' | ||
< | < | ||
- | summary(fit, | + | summary(fit, |
</ | </ | ||
Line 687: | Line 691: | ||
interest~~anxiety' | interest~~anxiety' | ||
- | fit< | + | fit< |
- | summary(fit, | + | summary(fit, |
</ | </ | ||
Line 768: | Line 772: | ||
interest~~anxiety | interest~~anxiety | ||
' | ' | ||
- | fit <- lavaan(model. data=processdata) | + | fit <- lavaan(model, data=processdata) |
- | fit <- sem(model. data=processdata) | + | fit <- sem(model, data=processdata) |
summary(fit, | summary(fit, |
r/path_analysis.1668605850.txt.gz · Last modified: 2022/11/16 22:37 by hkimscil