to measure the internal consistency and reliability of a questionnaire or survey

* 측정한 설문이 개인별 일관성 있게 측정되었는지 검사

 

H0

1. 각 항목은 동일한 주제를 측정하는 것이다.

2. 각 항목의 중요도는 모두 동일하다.

각 값의 interpretation

Packages

- install.packages("psy") 
-> library(psy)
-> cronbach(data)

or 

- install.packages("psych")
-> library(psych)
-> a <- alpha(data)
-> a$total
*이 때의 raw_alpha가 Cronbach's alpha를 의미 함.

or 

- install.packages("ltm")
library(ltm)
cronbach.alpha(data, Cl=True)
##Cl=True means to show 95% confidence interval

반응형

'Statistics' 카테고리의 다른 글

R on VScode - 1  (0) 2023.06.01
Macbook pro, m1pro (2021)

R Studio 사용을 고려하였지만, package 사용 간편함이나, 이미 세팅한 zsh터미널 활용, 그리고 git등의 범용적 사용 고려했을때, VScode에 세팅하는 것이 나을 것으로 보여 VScode(microsoft)로 R 을 사용하기로 하였다.

 

R 4.3.0v.

https://cran.r-project.org/src/base/R-4/

 

Index of /src/base/R-4

 

cran.r-project.org

https://code.visualstudio.com

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

에서 어플리케이션 다운로드 후

 

extension에서 'R extension for Visual studio code', 'R debugger for VS code', 'Excel viewer' 등을 설치하였고,

 

https://github.com/REditorSupport/vscode-R/wiki/Getting-Started

 

Getting Started

R Extension for Visual Studio Code. Contribute to REditorSupport/vscode-R development by creating an account on GitHub.

github.com

에서의 항목을 따르면 되겠습니다.

To enjoy the full R development experience, we recommend that you install all of the following packages:

  • vscode-R: Provides R language service, R Markdown, and interactivity between VS Code and R terminal.
  • languageserver: An R package that implements the Language Server Protocol for R to provide a wide range of language analysis features such as auto-completion, function signature, documentation, symbol highlight, document outline, code formatting, symbol hover, diagnostics, go to definition, find references, etc.
  • radian: A modern R console that corrects many limitations of the official R terminal and supports many features such as syntax highlighting and auto-completion.
  • VSCode-R-Debugger: A VS Code extension to support R debugging capabilities.
  • httpgd: An R package to provide a graphics device that asynchronously serves SVG graphics via HTTP and WebSockets. vscode-R uses httpgd to provide an interactive plot viewer.
  • rmarkdown: An R package and format for creating reproducible and narrative-driven data analyses. vscode-R provides tooling to edit, run, and knit Rmarkdown files.
  • Pandoc (optional): A powerful document conversion tool. vscode-R uses this to render help previews when users hover over R code.

 이 중 R에서

install.packages('"languageserver")

공유된 객체 '/Library/Frameworks/R.framework/Resources/modules//R_X11.so'를 로드 할 수 없습니다:

라는 에러 메시지를 확인할 수 있는데

 

이 경우

터미널에서

brew install --cask xquartz

로 설치하는 경우 해결할 수 있습니다.

반응형

'Statistics' 카테고리의 다른 글

Cronbach's alpha in R  (0) 2023.09.11

+ Recent posts