R - basic summary 결과값 해석
2023. 5. 7. 00:30ㆍ데이터 분석/에러
강의를 들을 때마다 반복해서 나오길래 이해하기 쉽게 정리해보았다.
공식도 당연히 알아야겠지만 일단은 결과들을 이해하고나서 역순으로 뜯어보는게 이해하기 쉽다고 봐서 먼저 쓴다.
원래는 lm summary와 anova도 같이 쓰려고 헀는데 각각 양이 엄청나서 그냥 따로 쓰려고 한다.
이름
? 설명
콘솔 값 테이블
콘솔값 설명
summary(data)
Object Summaries
Description
summary is a generic function used to produce result summaries of the results of various model fitting functions. The function invokes particular methods which depend on the class of the first argument.
Usage
summary(object, ...)
> test테이블이 column 3, row n이라 각 컬럼별 5 summary와 중앙값 median 을 보여줌.
* median = 중앙값(순서대로 정렬시 중심값), mean = 평균(총합/n)
data.lm
Fitting Linear Models
Description
lm is used to fit linear models, including multivariate ones. It can be used to carry out regression, single stratum analysis of variance and analysis of covariance (although aov may provide a more convenient interface for these).
Usage
lm(formula, data, subset, weights, na.action,
method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE,
singular.ok = TRUE, contrasts = NULL, offset, ...)
> 리니어모델로 변수에 저장.
* formula 부분은 geeksforgeeks에도 나와있는데 ~의 사용에 관하여 짧게 설명하자면
독립변수와 종속변수간 관계를 정의하기위해 쓴다. ~왼쪽에 의존변수를 쓰고 오른쪽에 독립변수를 쓴다.
다시말해 오른쪽값을 기준으로 왼쪽 변수를 불러온다고 볼 수 있다. (X를 기준으로 Y)
https://www.geeksforgeeks.org/use-of-tilde-in-r/
728x90
'데이터 분석 > 에러' 카테고리의 다른 글
R - 한글 깨질 때 (0) | 2023.05.24 |
---|---|
R - This warning is displayed once every 8 hours.Call `lifecycle::last_lifecycle_warnings()` to see where thiswarning was generated. (0) | 2023.05.22 |
회귀모형 그래프 그릴때 본 에러 (0) | 2023.05.09 |
R - 히스토그램과 확률밀도함수 같이 그릴때 본 에러 (0) | 2023.04.29 |
KESS 다운로드 및 적용 (0) | 2023.03.16 |