Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 회귀모형
- 기본가정
- by oneself
- post man
- 정규성
- 등분산성
- 기술통계분석
- 회귀분석
- 선형성
- 전처리
- 다중공선성
- cook's distance
- sql
- 워홀
- VIF
- 디시전트리
- contrasts can be applied only to factors with 2 or more levels
- 언어분석
- disgusting
- 등분산검정
- 오류
- 분류
- 코딩테스트
- 이변량 분석
- 이상치
- 자기상관
- KNNImputer
- R
- 엑셀
- 예측
Archives
- Today
- Total
목록contrasts can be applied only to factors with 2 or more levels (1)
excelsu의 공부 기록 블로그
[R오류] contrasts can be applied only to factors with 2 or more levels
회귀분석을 진행하다가 lm(rawdata$qwe~., data=rawdata) 를 실행했는데 contrasts can be applied only to factors with 2 or more levels 오류가 떴다. 원인은 여러가지가 있는데 한컬럼의 데이터가 전부 같을때 발생한다. 전부 같은데이터인지 확인하기 위해서는 values_count 1]) 으로 확인해 보면 된다. 그래도 해결이 안된다면 na값이 있을때 발생하는 오류이기때문에 na값을 채워주거나 행을 삭제하고 실행하면 된다.. 참고 : https://statisticsglobe.com/r-error-contrasts-applied-to-factors-with-more-levels R Error: contrasts can be applied o..
R
2022. 6. 30. 14:39