class_docstr: A Formula is a model for a mean in a regression model.
  
  It is often given by a sequence of sympy expressions, with the mean
  model being the sum of each term multiplied by a linear regression
  coefficient.
  
  The expressions may depend on additional Symbol instances, giving a
  non-linear regression model.
class_docstr_tok: ["A","Formula","is","a","model","for","a","mean","in","a","regression","model",".","It","is","often","given","by","a","sequence","of","sympy","expressions",",","with","the","mean","model","being","the","sum","of","each","term","multiplied","by","a","linear","regression","coefficient",".","The","expressions","may","depend","on","additional","Symbol","instances",",","giving","a","non-linear","regression","model","."]
docstr: New Formula combining terms of `self` with those of `other`.
  
  Parameters
  ----------
  other : Formula instance
      Object for which ``is_formula(other)`` is True
  
  Returns
  -------
  added : Formula instance
      Formula combining terms of `self` with terms of `other`
  
  Examples
  --------
  >>> x, y, z = [Term(l) for l in 'xyz']
  >>> f1 = Formula([x,y,z])
  >>> f2 = Formula([y])+I
  >>> f3=f1+f2
  >>> sorted(f1.terms, key=default_sort_key)
  [x, y, z]
  >>> sorted(f2.terms, key=default_sort_key)
  [1, y]
  >>> sorted(f3.terms, key=default_sort_key)
  [1, x, y, y, z]
docstr_tok: ["New","Formula","combining","terms","of","`","self","`","with","those","of","`","other","`",".","Parameters","--","--","--","--","--","other",":","Formula","instance","Object","for","which","``","is_formula","(","other",")","``","is","True","Returns","--","--","--","-","added",":","Formula","instance","Formula","combining","terms","of","`","self","`","with","terms","of","`","other","`","Examples","--","--","--","--",">",">",">","x",",","y",",","z","=","[","Term","(","l",")","for","l","in","'xyz","'","]",">",">",">","f1","=","Formula","(","[","x",",","y",",","z","]",")",">",">",">","f2","=","Formula","(","[","y","]",")","+I",">",">",">","f3=f1+f2",">",">",">","sorted","(","f1.terms",",","key=default_sort_key",")","[","x",",","y",",","z","]",">",">",">","sorted","(","f2.terms",",","key=default_sort_key",")","[","1",",","y","]",">",">",">","sorted","(","f3.terms",",","key=default_sort_key",")","[","1",",","x",",","y",",","y",",","z","]"]
code: def __add__(self, other):
      """New Formula combining terms of `self` with those of `other`.
  
      Parameters
      ----------
      other : Formula instance
          Object for which ``is_formula(other)`` is True
  
      Returns
      -------
      added : Formula instance
          Formula combining terms of `self` with terms of `other`
  
      Examples
      --------
      >>> x, y, z = [Term(l) for l in 'xyz']
      >>> f1 = Formula([x,y,z])
      >>> f2 = Formula([y])+I
      >>> f3=f1+f2
      >>> sorted(f1.terms, key=default_sort_key)
      [x, y, z]
      >>> sorted(f2.terms, key=default_sort_key)
      [1, y]
      >>> sorted(f3.terms, key=default_sort_key)
      [1, x, y, y, z]
      """
      if not is_formula(other):
          raise ValueError(
              "only Formula objects can be added to a Formula"
          )
      f = Formula(np.hstack([self.terms, other.terms]))
      return f
  
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 11 for calling the Formula obj's underlying member method code with example usage: obj.__add__(other) and returns: f