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

regressor with interaction #69

Open
dokato opened this issue Oct 23, 2020 · 0 comments
Open

regressor with interaction #69

dokato opened this issue Oct 23, 2020 · 0 comments

Comments

@dokato
Copy link

dokato commented Oct 23, 2020

I've got data that looks like this (with response accuracy encoded):

        Idx        rt  response  axes  cogr      cond      subj    angle
          0  2.384600         1   2.0   0.0        I2         0      20
          1  1.960730         1   2.0   0.0        I2         0      20
          3  1.857445         1   1.0   0.0        I1         0      20
          4 -2.672745         0   2.0   1.0        C2         0      20
          5  1.869880         1   2.0   0.0        I2         0      20

I want to create regression model for v and t, with baseline condition I2. I also want to include interaction dep. on angle. After studying docs of hddm and patsy I think that something like this should work:

vmod = {'model': "v ~ C(cond, Treatment('I2')):C(angle)", 'link_func': lambda x: x}
tmod = {'model': "t ~ C(cond, Treatment('I2')):C(angle)", 'link_func': lambda x: x}

m = hddm.HDDMRegressor(dataf, [vmod, tmod], include = 't', p_outlier=0.05, bias = False)

However, I'm getting:

NotImplementedError: Missing columns in design matrix. You need data for all conditions for all subjects.

Do you know some workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant