Backtransformation coefficients, confidence intervals from Box-Cox in R

问题描述 投票:0回答:0

我已经创建了模型并对响应使用了 box cox 变换:

model1.5 <- lm(tas1 ~ station1, data=test, x=TRUE, y=TRUE)
bc <-boxcox(model1.5)
lambda <- bc$x[which.max(bc$y)]
new_model <- lm(((tas1^lambda-1)/lambda) ~ station, data=all_ex)
summary(new_model)

其中 lambda = 0.2222222。如何将系数和 CI 反向转换为原始比例? 数据集是:

structure(list(tas1 = c(147.139349640639, 34.24505211115, 99.4384813757956, 
27.0461904689241, 43.7314024995039, 6.8624662383836, 26.5079578227765, 
153.799978636717, 32.4285169304017, 56.9853814108924, 80.4657805990873, 
346.352707796072, 15.7433048998214, 46.758961134085, 68.8264996261428, 
86.9245723528602, 37.3398898264995, 1.95109334228573, 63.3768940838968, 
117.940228587124), station = c("CPH", "CPH", "CPH", "CPH", "CPH", 
"CPH", "CPH", "CPH", "CPH", "CPH", "Her", "Her", "Her", "Her", 
"Her", "Her", "Her", "Her", "Her", "Her"), date = structure(c(3815, 
3821, 3867, 4888, 5331, 5668, 5688, 5704, 5707, 6048, 3461, 3814, 
3818, 3846, 3905, 4192, 5000, 5237, 5306, 6059), class = "Date")), row.names = c(NA, 
-20L), class = "data.frame")
r linear-regression transformation
© www.soinside.com 2019 - 2024. All rights reserved.