下面我展示了我为估计 eta 编写的部分代码。在第一个输出中,我使用普通 df,在第二个输出中使用温室 geisser df,在第三个输出中使用 hyndt df。您可以通过 df*ε 获得调整后的 df。根据我所写的,假设一切都是正确的,据我所知,eta 和部分 eta 不会改变。
es<-function(condition,ss_effects,ss_error,df_ef,df_er,n) {
ss_total<-ss_effects+ss_error
ms_effects<-ss_effects/df_ef
ms_error<-ss_error/df_er
ms_total<-ms_effects+ms_error
eta_squared<-ss_effects/ss_total
partial_eta<-ss_effects/(ss_effects+ss_error)
omega_squared<-(df_ef*(ms_effects-ms_error))/(ss_total+ms_error)
partial_omega<-(df_ef*(ms_effects-ms_error))/(df_ef*ms_effects+(n-df_ef)*ms_error)
cohens_f<-sqrt(eta_squared/(1-eta_squared))
result<-data.frame(condition,ss_total,ms_effects,ms_error,ms_total,eta_squared,partial_eta,omega_squared,partial_omega,cohens_f)
return(result)
}
> es(condition=result_repeated$condition,ss_effects=ss_effects,ss_error=ss_error,df_ef=df_ef,df_er=df_er,n=n)
condition ss_total ms_effects ms_error ms_total eta_squared partial_eta omega_squared partial_omega cohens_f
1 (Intercept) 56477.6604 55994.788226 2.4264934 55997.214719 0.99145021 0.99145021 0.9913646526 0.7807508983 10.76856192
2 IV1 31611.1552 15667.955258 0.6915697 15668.646827 0.99129280 0.99129280 0.9912273571 0.8748775914 10.66993196
3 IV2 29447.1128 14584.040310 0.7010859 14584.741396 0.99052429 0.99052429 0.9904530958 0.8652306377 10.22413944
4 IV3 298.3998 2.315401 0.7381130 3.053514 0.01551879 0.01551879 0.0105455609 0.0006591085 0.12555245
5 IV1:IV2 796.1730 3.083176 0.9847241 4.067900 0.01548998 0.01548998 0.0105296693 0.0013137071 0.12543402
6 IV1:IV3 698.4388 2.233520 0.8662120 3.099732 0.01279150 0.01279150 0.0078209534 0.0009734288 0.11382988
7 IV2:IV3 761.3055 1.129699 0.9507371 2.080436 0.00593559 0.00593559 0.0009391186 0.0001161811 0.07727245
8 IV1:IV2:IV3 1369.0296 3.530436 0.8422024 4.372638 0.02063029 0.02063029 0.0156991811 0.0039251608 0.14513741
> es(condition=result_repeated$condition,ss_effects=ss_effects,ss_error=ss_error,df_ef=result_repeated$GG_df_ef,df_er=result_repeated$GG_df_er,n=n)
condition ss_total ms_effects ms_error ms_total eta_squared partial_eta omega_squared partial_omega cohens_f
1 (Intercept) 56477.6604 NA NA NA 0.99145021 0.99145021 NA NA 10.76856192
2 IV1 31611.1552 15736.719217 0.6946049 15737.413822 0.99129280 0.99129280 0.9912272620 0.8743974241 10.66993196
3 IV2 29447.1128 14819.338300 0.7123972 14820.050698 0.99052429 0.99052429 0.9904527154 0.8633533962 10.22413944
4 IV3 298.3998 2.344612 0.7474250 3.092037 0.01551879 0.01551879 0.0105452327 0.0006509022 0.12555245
5 IV1:IV2 796.1730 3.204442 1.0234546 4.227896 0.01548998 0.01548998 0.0105291577 0.0012640554 0.12543402
6 IV1:IV3 698.4388 2.348475 0.9107944 3.259270 0.01279150 0.01279150 0.0078204548 0.0009258246 0.11382988
7 IV2:IV3 761.3055 1.276727 1.0744736 2.351201 0.00593559 0.00593559 0.0009389662 0.0001028031 0.07727245
8 IV1:IV2:IV3 1369.0296 3.978377 0.9490609 4.927438 0.02063029 0.02063029 0.0156979565 0.0034847513 0.14513741
> es(condition=result_repeated$condition,ss_effects=ss_effects,ss_error=ss_error,df_ef=result_repeated$HF_df_ef,df_er=result_repeated$HF_df_er,n=n)
condition ss_total ms_effects ms_error ms_total eta_squared partial_eta omega_squared partial_omega cohens_f
1 (Intercept) 56477.6604 NA NA NA 0.99145021 0.99145021 NA NA 10.76856192
2 IV1 31611.1552 15579.595929 0.6876696 15580.283599 0.99129280 0.99129280 0.9912274794 0.8754953645 10.66993196
3 IV2 29447.1128 14673.954723 0.7054083 14674.660131 0.99052429 0.99052429 0.9904529504 0.8645123245 10.22413944
4 IV3 298.3998 2.321489 0.7400537 3.061543 0.01551879 0.01551879 0.0105454925 0.0006573812 0.12555245
5 IV1:IV2 796.1730 3.134901 1.0012444 4.136146 0.01548998 0.01548998 0.0105294511 0.0012920592 0.12543402
6 IV1:IV3 698.4388 2.298103 0.8912590 3.189362 0.01279150 0.01279150 0.0078206733 0.0009460984 0.11382988
7 IV2:IV3 761.3055 1.251285 1.0530618 2.304347 0.00593559 0.00593559 0.0009389926 0.0001048931 0.07727245
8 IV1:IV2:IV3 1369.0296 3.822652 0.9119120 4.734564 0.02063029 0.02063029 0.0156983822 0.0036261961 0.14513741