Open astoermann opened 4 years ago
Code:
cm_a = ContrastMatrix([[-.5], [.5]], ["[ThreatCondition]"]) cm_b = ContrastMatrix( [ [2/3, 0], [-1/3, -.5], [-1/3, .5] ], ["[Condition:CvI]", "[Condition:URx]"])
fg_contrast_threatbycondition = fitgrid.lm( epochs_fg_stmath, LHS =['MiPa'], RHS='C(ThreatCondition, cm_a) * C(Condition, cm_b)', )
ERROR MESSAGE:
NameError Traceback (most recent call last) ~/.conda/envs/mkconda_0.0.10/lib/python3.6/site-packages/patsy/compat.py in call_and_wrap_exc(msg, origin, f, *args, *kwargs) 35 try: ---> 36 return f(args, **kwargs) 37 except Exception as e:
~/.conda/envs/mkconda_0.0.10/lib/python3.6/site-packages/patsy/eval.py in eval(self, expr, source_name, inner_namespace) 165 return eval(code, {}, VarLookupDict([inner_namespace] --> 166 + self._namespaces)) 167
Imported packages: from patsy import dmatrix, ContrastMatrix, balanced
Code:
cm_a = ContrastMatrix([[-.5], [.5]], ["[ThreatCondition]"]) cm_b = ContrastMatrix( [ [2/3, 0], [-1/3, -.5], [-1/3, .5] ],
["[Condition:CvI]", "[Condition:URx]"])
fg_contrast_threatbycondition = fitgrid.lm( epochs_fg_stmath, LHS =['MiPa'], RHS='C(ThreatCondition, cm_a) * C(Condition, cm_b)', )
ERROR MESSAGE:
NameError Traceback (most recent call last) ~/.conda/envs/mkconda_0.0.10/lib/python3.6/site-packages/patsy/compat.py in call_and_wrap_exc(msg, origin, f, *args, *kwargs) 35 try: ---> 36 return f(args, **kwargs) 37 except Exception as e:
~/.conda/envs/mkconda_0.0.10/lib/python3.6/site-packages/patsy/eval.py in eval(self, expr, source_name, inner_namespace) 165 return eval(code, {}, VarLookupDict([inner_namespace] --> 166 + self._namespaces)) 167