我有一个包含类别"AIEasyToxicFactor"的框架,其数据是从强烈同意到强烈不同意的Likert量表.
当我try 为它与前一个月使用AI的次数的关系创建LRM时(一个名为"HowManyTimesUsedLastMonth"的类别),然后试图生成它的摘要时,AIEasyToUseFactor中的"Agree"因子丢失了.你知道为什么会这样吗?
代码:
levels(df$AIEasyToUseFactor) <- c("Agree", "Disagree", "Neither", "Str.Agree", "Str.Disagree")
linModel <- lm(HowManyTimesUsedLastMonth~AIEasyToUseFactor,data=df)
summary(linModel)
它所产生的成果:
Call:
lm(formula = HowManyTimesUsedLastMonth ~ AIEasyToUseFactor, data = df)
Residuals:
Min 1Q Median 3Q Max
-8.731 -4.922 -1.922 0.493 91.269
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.922 1.148 4.288 2.69e-05 ***
AIEasyToUseFactorDisagree -2.547 4.256 -0.598 0.5502
AIEasyToUseFactorNeither -3.553 2.203 -1.613 0.1082
AIEasyToUseFactorStr.Agree 3.810 1.823 2.090 0.0377 *
AIEasyToUseFactorStr.Disagree 2.442 3.678 0.664 0.5074
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 11.59 on 221 degrees of freedom
(1 observation deleted due to missingness)
Multiple R-squared: 0.04805, Adjusted R-squared: 0.03082
F-statistic: 2.789 on 4 and 221 DF, p-value: 0.02734
我对R和RStudio完全陌生,所以恐怕我还不能自己try 修复很多错误.