Skip to content

Multivariate Normality Test using Shapiro test in R

1. Subset data ให้มีเฉพาะ items ใน SEM เท่านั้นครับ วิธีคือสร้าง object ใหม่

items <- data[n:m]

items คือ object ใหม่ที่มีเฉพาะ items ใน CFA / SEM

n คือ column แรกของ item
m คือ column สุดท้ายของ item

2. Transpose ข้อมูล

items.t <- t(items)

3. ใช้ function mshapiro() จาก package ​mvnormtest

install.packages("mvnormtest")
library(mvnormtest)
mshapiro(items.t)

ผลที่ได้ควรจะ significant (p < 0.05) at 5% significant level

ที่มา: http://finzi.psych.upenn.edu/library/mvnormtest/html/mshapiro.test.html

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: