class_docstr: A qualitative variable in a regression model
  
  A Factor is similar to R's factor. The levels of the Factor can be
  either strings or ints.
class_docstr_tok: ["A","qualitative","variable","in","a","regression","model","A","Factor","is","similar","to","R","'s","factor",".","The","levels","of","the","Factor","can","be","either","strings","or","ints","."]
code: def _getmaineffect(self, ref=-1):
      v = list(self._terms.copy())
      ref_term = v[ref]
      v.pop(ref)
      return Formula([vv - ref_term for vv in v])
  
imports: import itertools
  import warnings
  from string import ascii_letters, digits
  import numpy
  import sympy
  from scipy.linalg import pinv
  from sympy import Dummy, default_sort_key
  from sympy.utilities.lambdify import implemented_function, lambdify
  from nipy.algorithms.utils.matrices import full_rank, matrix_rank
  from nipy.utils import VisibleDeprecationWarning, _NoValue
label_desc: Use image node_id 3 for calling the Factor obj's underlying member method code with example usage: obj._getmaineffect(ref) and returns: Formula