“Look Deep Into Nature, And Then You Will Understand Everything Better.” - Albert Einstein

“Look deep into nature, and then you will understand everything better.” - Albert Einstein

More Posts from Kimduong-lhp-blog and Others

8 years ago

Lavaan cheat sheet

Lavaan Cheat Sheet

Assumptions

Data is data frame

model is the lavaan model syntax character variable

fit is an object of class lavaan typically returned from functions cfa, sem, growth, and lavaan

m1_fit and m2_fit are used for showing model comparison of lavaan objects.

Documentation tips

Introduction: http://users.ugent.be/~yrosseel/lavaan/lavaanIntroduction.pdf

Basic model commmands: ?cfa ?sem ?lavaan:

Extracting elements: ?inspect

Model fitting

Name Command fit CFA to data cfa(model, data=Data) fit SEM to data sem(model, data=Data) standardised solution sem(model, data=Data, std.ov=TRUE) orthogonal factors cfa(model, data=Data, orthogonal=TRUE)

Matrices

Name Command Factor covariance matrix inspect(fit, "coefficients")$psi Fitted covariance matrix fitted(fit)$cov Observed covariance matrix inspect(fit, 'sampstat')$cov Residual covariance matrix resid(fit)$cov Factor correlation matrix cov2cor(inspect(fit, "coefficients")$psi) or use covariance command with standardised solution e.g., cfa(..., std.ov=TRUE)

Fit Measures

Name Command Fit measures: fitMeasures(fit) Specific fit measures e.g.: fitMeasures(fit)[c('chisq', 'df', 'pvalue', 'cfi', 'rmsea', 'srmr')]

Parameters

Name Command Parameter information parTable(fit) Standardised estimates standardizedSolution(fit) or summary(fit, standardized=TRUE)

R-squared | inspect(fit, 'r2')

Compare models

Name Command Compare fit measures cbind(m1=inspect(m1_fit, 'fit.measures'), m2=inspect(m2_fit, 'fit.measures')) Chi-square difference test anova(m1_fit, m2_fit)

Model improvement

Name Command Modification indices mod_ind <- modificationindices(fit) 10 greatest head(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], 10) mi > 5 subset(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], mi > 5)


Tags
8 years ago
Như Lai. Tathāgata

Như Lai. Tathāgata


Tags
8 years ago

Hoàn khố bất ngạ tử Nho quan đa ngộ thân. -  紈褲不餓死 儒冠多誤身.

Đỗ Phủ, Phụng tặng Vi Tả Thừa (杜甫, 奉贈韋左丞)


Tags
8 years ago

Gá thân mộng, Dạo cảnh mộng. Mộng tan rồi, Cười vỡ mộng. Ghi lời mộng, Nhắn khách mộng. Biết được mộng, Tỉnh cơn mộng.

Thích Thanh Từ, Mộng (07.1980)

8 years ago

When you know illusion, you will immediately be free. Freedom from illusion is in itself enlightenment. - Tri huyễn tức ly. Ly huyễn tức giác.

Phật, Kinh Viên Giác (Buddha, The Sutra of Perfect Enlightenment)

Biết nó là giả (huyễn) bèn ly cái khổ. Ly được cái huyễn tức là người giác ngộ.


Tags
8 years ago

Ring of Fire Solar Eclipse as seen over Coyhaique, Chile


Tags
8 years ago

The wise delight in water; the benevolent delight in mountains. The wise take action; the benevolent remain still. The wise are joyful; the benevolent are long-lived. -  “Trí giả nhạo thủy, nhân giả nhạo sơn. Trí giả động, nhân giả tĩnh. Trí giả lạc, nhân giả thọ.” -  “知者乐水,仁者好山; 智者欲发,仁者静; 智者乐,仁者寿。

Confucius / Khổng Tử / 子曰


Tags
6 years ago
“If Bach Is Not In Heaven, I Am Not Going!” William F. Buckley, Jr.

“If Bach is not in Heaven, I am not going!” William F. Buckley, Jr.

8 years ago

Waking up this morning, I smile. Twenty-four brand new hours are before me. I vow to live fully in each moment and to look at all beings with eyes of compassion. - Thức dậy miệng mỉm cười. Hăm bốn giờ tinh khôi. Xin nguyện sống trọn vẹn, Mắt thương nhìn cuộc đời.

Thich Nhat Hanh

Loading...
End of content
No more pages to load

von Labland

69 posts

Explore Tumblr Blog
Search Through Tumblr Tags