joint_tests无法通过make.tran()识别asin.sqrt转换。

huangapple go评论64阅读模式
英文:

joint_tests doesn't recognize asin.sqrt transformation via make.tran()

问题

我有以下的虚拟模型

tran = make.tran("asin.sqrt", 100)

mod <- with(tran,
lm(linkfun(cty) ~ manufacturer +  drv * linkfun(hwy), data = mpg))

但是,我无法使用以下代码获得ANOVA表格

joint_tests(mod)
Error in ratios && true.con && misc$tran %in% c("log", "log2", "log10",  : 
  'length = 5' in coercion to 'logical(1)'

emmeans识别了转换,如以下网址详细说明:https://cran.r-project.org/web/packages/emmeans/vignettes/transformations.html

emmeans(mod, ~ manufacturer, type = "response")
manufacturer response    SE  df lower.CL upper.CL
 audi             15.0 0.258 214     14.4     15.5
 chevrolet        16.1 0.240 214     15.7     16.6
 dodge            16.2 0.216 214     15.8     16.6
 ford             16.6 0.223 214     16.2     17.1
 honda            17.4 0.390 214     16.7     18.2
 hyundai          16.1 0.289 214     15.5     16.7
 jeep             16.5 0.362 214     15.8     17.2
 land rover       15.2 0.480 214     14.2     16.1
 lincoln          15.7 0.634 214     14.4     16.9
 mercury          16.0 0.479 214     15.1     17.0
 nissan           16.8 0.289 214     16.2     17.3
 pontiac          14.8 0.423 214     14.0     15.7
 subaru           16.9 0.356 214     16.2     17.6
 toyota           16.9 0.206 214     16.5     17.3
 volkswagen       16.5 0.248 214     16.0     17.0

Results are averaged over the levels of: drv 
Confidence level used: 0.95 
Intervals are back-transformed from the asin(sqrt(mu/100)) scale

如何解决这个问题?感谢您的帮助。

英文:

I have the following dummy model

tran = make.tran("asin.sqrt", 100)

mod <- with(tran,
lm(linkfun(cty) ~ manufacturer +  drv * linkfun(hwy), data = mpg))

but, I cannot get the ANOVA table with

joint_tests(mod)
Error in ratios && true.con && misc$tran %in% c("log", "log2", "log10",  : 
  'length = 5' in coercion to 'logical(1)'

emmeans does recognize the transformation, as detailed in <https://cran.r-project.org/web/packages/emmeans/vignettes/transformations.html>.

emmeans(mod, ~ manufacturer, type = &quot;response&quot;)
manufacturer response    SE  df lower.CL upper.CL
 audi             15.0 0.258 214     14.4     15.5
 chevrolet        16.1 0.240 214     15.7     16.6
 dodge            16.2 0.216 214     15.8     16.6
 ford             16.6 0.223 214     16.2     17.1
 honda            17.4 0.390 214     16.7     18.2
 hyundai          16.1 0.289 214     15.5     16.7
 jeep             16.5 0.362 214     15.8     17.2
 land rover       15.2 0.480 214     14.2     16.1
 lincoln          15.7 0.634 214     14.4     16.9
 mercury          16.0 0.479 214     15.1     17.0
 nissan           16.8 0.289 214     16.2     17.3
 pontiac          14.8 0.423 214     14.0     15.7
 subaru           16.9 0.356 214     16.2     17.6
 toyota           16.9 0.206 214     16.5     17.3
 volkswagen       16.5 0.248 214     16.0     17.0

Results are averaged over the levels of: drv 
Confidence level used: 0.95 
Intervals are back-transformed from the asin(sqrt(mu/100)) scale 

How can I get around this issue? Thanks for stopping by.

答案1

得分: 1

这是一个已经被最近修复以供将来在emmeans中更新的已知错误。

英文:

This is a known bug that has been recently fixed for future updates in emmeans.

huangapple
  • 本文由 发表于 2023年8月4日 23:39:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76837389.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定