如何获得每个参与者的分配 [英] How to get distribution for each participant

查看:80
本文介绍了如何获得每个参与者的分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将高斯逆分布拟合到每个参与者的响应时间,以获取每个参与者的分布的mu和lambda.但是,即使我尝试了许多方法,也总是为所有参与者提供相同的输出,而不是分别分配给每个参与者.

I am trying to fit the inverse gaussian distribution to each participant's response times to get the mu and lambda of the distribution for each participant. However, even though I tried many ways of doing it, it always gives me the same output for all participants instead of fitting the distribution to each participant individually.

我尝试了以下操作:

  library(goft)
  require(stats)
  by(Data, Data[,"Participant"], function (x) ig_fit(Data$RT)))

输出

 Data[, "Participant"]: P001G01S01
        Inverse Gaussian MLE 
 mu                  448.8195
 lambda             6486.4473


Data[, "Participant"]: P002G01S02
        Inverse Gaussian MLE 
 mu                  448.8195
 lambda             6486.4473


Data[, "Participant"]: P003G02S01
      Inverse Gaussian MLE 
 mu                  448.8195
 lambda             6486.4473

我期望以下几点:

Participant  mu        lambda

1            480.252    6005.23
2            521.23     5312.632
3            490.325    6320.53

推荐答案

按照@akrun的建议,较小的更改有效.

As suggested by @akrun, the minor change worked.

  library(goft)
  require(stats)
  by(Data, Data[,"Participant"], function (x) ig_fit(x$RT)))

这篇关于如何获得每个参与者的分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆