fabianp / hrf_estimation

HRF estimation
13 stars 6 forks source link

r1glms code question #6

Open bpinsard opened 7 years ago

bpinsard commented 7 years ago

Hi Fabian, I was trying to understand the machinery of the r1glms estimation and in the code here https://github.com/fabianp/hrf_estimation/blob/master/hrf_estimation/rank_one_.py#L417 if I understand correctly W_init is an initial estimation of the betas per regressor. However in this line, the first row corresponding to the first regressor/the first event is omitted, is there a reason? Shouldn't it be the drift/intercept (last row) that should be removed?

Also I was wondering if it makes sense and would it work to use rank_one() with a block design instead of event-related, including event duration with boxcars convolved with a hrf or 3hrf?

Thanks.

fabianp commented 7 years ago

Hi! Yes, W_init is just an initialization so it is possible that there are better ways to do it. I haven't worked in this project for years so I frankly don't remember why I did it like that.

I think it a similar model could indeed work with a block design (although I didn't try it), in the sense that you can probably add a rank-1 constraint to that model to force the HRF to be equal across conditions.

hope that helps