Multi-way interaction: easy way to get numerical coefficient estimates?

前端 未结 1 802
野的像风
野的像风 2021-01-19 05:08

Let\'s say there\'s a 4-way interaction, with a 2x2x2 factorial design plus a continuous variable. Factors have the default contrast coding (contr.treatment). H

相关标签:
1条回答
  • 2021-01-19 05:58

    You're looking for the lsmeans package. Check it out:

    lstrends(mod, specs = c('cat1', 'cat2', 'cat3'), var = 'cont1')
    
    cat1 cat2 cat3 cont1.trend         SE  df    lower.CL  upper.CL
     a    c    e     0.01199024 0.08441129 984 -0.15365660 0.1776371
     b    c    e     0.01083637 0.08374605 984 -0.15350502 0.1751778
     a    d    e     0.03534914 0.09077290 984 -0.14278157 0.2134799
     b    d    e    -0.03568548 0.09644117 984 -0.22493948 0.1535685
     a    c    f     0.07295093 0.08405090 984 -0.09198868 0.2378905
     b    c    f    -0.04864978 0.09458902 984 -0.23426916 0.1369696
     a    d    f    -0.04537903 0.09363128 984 -0.22911897 0.1383609
     b    d    f    -0.03506820 0.08905581 984 -0.20982934 0.1396929
    
    0 讨论(0)
提交回复
热议问题