You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running uf_designmat(...'formula','y~-1+cat(test)'), (with test having n levels the internal matlab function does not return n levels as I expected, but n-1 (identical to the '1+cat(test)' case.
Thanks to Pau Blanco from UPF for reporting this!
The text was updated successfully, but these errors were encountered:
Hey!
thanks for the file. I replicated the problem but have to think on a general solution.
If you don't surpress the intercept, everything works as intended, as a n-level factor will be represented by n-1 predictors + the intercept. Which what you have.
There is indeed a bug when surpressing the intercept, then the matlab backend also returns n-1 predictors, which, frankly, doesn't make much sense to me :/ I have to read into it, I opened an issue on #69 and will fix it as soon as I have time.
and add to your uf_designmat(...,'codingschema','full')
This should prevent matlab from removing the event with -1 and you should get your expected result. But beware, if you run it with full and you include an intercept, your betas will be overcomplete and not unique (you will also see a warning)! You then cannot interpret the results, except by taking so called estimable functions (differences) - ok but that might be too much detail, just be careful ;)
When running uf_designmat(...'formula','y~-1+cat(test)'), (with test having n levels the internal matlab function does not return n levels as I expected, but n-1 (identical to the '1+cat(test)' case.
Thanks to Pau Blanco from UPF for reporting this!
The text was updated successfully, but these errors were encountered: