R - 按组

时间:2018-01-10 22:12:35

标签: r

很抱歉,但是这一整天都是我试图策划这个而且我无法做到。 我的模特是:

f.e.model = lmer(Score ~ Relation_PenultimateLast*ExpertiseType + (1|TrajectoryType) + (1|StimulusType), data=datasheet.complete)

在我的模型中,我发现了两个效果(ExpertiseType和Relation_PenultimateLast)之间的交互:

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.37256 -0.89147 -0.04263  0.76205  2.03113 

Random effects:
 Groups         Name        Variance Std.Dev.
 TrajectoryType (Intercept) 0.02033  0.1426  
 StimulusType   (Intercept) 0.02467  0.1571  
 Residual                   1.29905  1.1398  
Number of obs: 8200, groups:  TrajectoryType, 25; StimulusType, 8

Fixed effects:
                                         Estimate Std. Error         df t value
(Intercept)                               3.34776    0.11432   60.00000  29.285
Relation_PenultimateLast                 -0.08628    0.03489   75.00000  -2.473
ExpertiseType                            -0.09776    0.03647 8166.00000  -2.680
Relation_PenultimateLast:ExpertiseType    0.05219    0.01274 8166.00000   4.097
                                       Pr(>|t|)    
(Intercept)                             < 2e-16 ***
Relation_PenultimateLast                0.01568 *  
ExpertiseType                           0.00737 ** 
Relation_PenultimateLast:ExpertiseType 4.22e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

在我希望看到的情节中:

x axis: Relation_PenultimateLast
y.axis: effect
colour: ExpertiseType

所以要有3行显示每个Relation_PenultimateLast的首选项(没有随机效果)

有可能吗? (我已安装:interplot,ggplot,ggplot2,sjPlot)

0 个答案:

没有答案