Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

computation t values incorrect on nirs example page #670

Open
robertoostenveld opened this issue May 4, 2023 · 0 comments
Open

computation t values incorrect on nirs example page #670

robertoostenveld opened this issue May 4, 2023 · 0 comments
Assignees

Comments

@robertoostenveld
Copy link
Member

@StolkArjen reported in a personal message that on page https://www.fieldtriptoolbox.org/example/nirs_glm/

Onderaan de pagina worden de beta waarden in t waarden geconverteerd: t = (c' * b) ./ sqrt(var(e) * (c' * (x'*x) * c))

Ik vraag me of dit het volgende dient te zijn: t = (c' * b) ./ sqrt(var(e) * (c' * inv(x'*x) * c))     << nadruk op de inverse

In ft_statfun_indepsamplesregrT wordt ook de inverse matrix gebruikt voor de SE berekening (invcpmat): 

  cpmat = designmat'*designmat;
  invcpmat = inv(cpmat);

En even later:

  se=sqrt(invcpmat(nblocks+1,nblocks+1)*resvar);
  s.stat=B(:,nblocks+1)./se;

Als ik de inverse gebruik in de formule van het example script, krijg ik dezelfde t-waarden als met ft_statfun_indepsamplesregrT en als met bijv. glmfit (matlab functie)

and I believe he is right.

@robertoostenveld robertoostenveld self-assigned this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant