Adds leverage term to the model

        Returns
        ----------
        None (changes instance attributes)
175738
def add_leverage(self):
                     

        if self.leverage is True:
            pass
        else:
            self.leverage = True
            self.z_no += 1
            self.latent_variables.z_list.pop()
            self.latent_variables.z_list.pop()
            self.latent_variables.z_list.pop()
            self.latent_variables.z_list.pop()
            self.latent_variables.add_z('Leverage Term', fam.Flat(transform=None), fam.Normal(0, 3))
            self.latent_variables.add_z('Skewness', fam.Flat(transform='exp'), fam.Normal(0, 3))
            self.latent_variables.add_z('v', fam.Flat(transform='exp'), fam.Normal(0, 3))
            self.latent_variables.add_z('Returns Constant', fam.Normal(0,3,transform=None), fam.Normal(0, 3))
            self.latent_variables.add_z('GARCH-M', fam.Normal(0,3,transform=None), fam.Normal(0, 3))
            self.latent_variables.z_list[-3].start = 2.0
1199212
def _add_implied_commands(self):
        
        if len(self.get_added_columns()) and not self._creating():
            self._commands.insert(0, self._create_command("add"))

        if len(self.get_changed_columns()) and not self._creating():
            self._commands.insert(0, self._create_command("change"))

        return self._add_fluent_indexes()
599637
private void addToWrapper(EntityMetadata entityMetadata, AttributeWrapper wrapper, Object resultedObject,
            Attribute attrib)
    {
        addToWrapper(entityMetadata, wrapper, resultedObject, attrib, null);
    }
1003852
def reset_terms_for(term)
      self.minor = 0 if term == :major
      self.patch = 0 if term == :major || term == :minor
      self.pre   = nil if [:major, :minor, :patch].include? term
      self.build = nil if [:major, :minor, :patch, :pre].include? term

      self
    end
775257
def add(self, parent, obj_type, **attributes):
        

        return self.ixn.add(parent.obj_ref(), obj_type, *self._get_args_list(**attributes))
405958
def recalculate_attributes(self, force=False):
        # type: (bool) -> None
        
        if not self._attributes_dirty and not force:
            return
        terms = [term for term, _ in self._term_counts.most_common()]
        if six.PY2:
            terms = np.array(terms, dtype=np.object)
        else:
            terms = np.array(terms)
        if len(terms):
            indices, signs = _get_indices_and_signs(self.hasher, terms)
        else:
            indices, signs = np.array([]), np.array([])
        self.terms_ = terms  # type: np.ndarray
        self.term_columns_ = indices
        self.term_signs_ = signs
        self.collisions_ = _get_collisions(indices)
        self.column_signs_ = self._get_column_signs()
        self._attributes_dirty = False
450471
def add_constraints(self):
        
        if self._constraints:
            foreign_key = getattr(self._parent, self._foreign_key, None)
            if foreign_key is None:
                self._query = None
            else:
                table = self._related.get_table()

                self._query.where(
                    "{}.{}".format(table, self._other_key), "=", foreign_key
                )
177824
def add_eager_constraints(self, models):
        
        self._models = Collection.make(models)
        self._build_dictionary(models)
744136
def add_alias(self, alias, indices, **kwargs):
        
        indices = self.conn._validate_indices(indices)

        return self.change_aliases(['add', index, alias,
                                    self._get_alias_params(**kwargs)]
                                    for index in indices)
1227345
def add_ref(self, ref, attr=None):
        
        self.session.add_ref(self, ref, attr)
        return self.fetch()
439161
def add_model(self, allow_alias=False, **kwargs):
        """"""
        if not allow_alias and MODEL.ALIAS in kwargs:
            err_str = "`{}` passed in kwargs, this shouldn't happen!".format(
                SOURCE.ALIAS)
            self._log.error(err_str)
            raise RuntimeError(err_str)

        # Set alias number to be +1 of current number of models
        if MODEL.ALIAS not in kwargs:
            kwargs[MODEL.ALIAS] = str(self.num_models() + 1)
        model_obj = self._init_cat_dict(Model, self._KEYS.MODELS, **kwargs)
        if model_obj is None:
            return None

        for item in self.get(self._KEYS.MODELS, ''):
            if model_obj.is_duplicate_of(item):
                return item[item._KEYS.ALIAS]

        self.setdefault(self._KEYS.MODELS, []).append(model_obj)
        return model_obj[model_obj._KEYS.ALIAS]
470778
def add_to_class(self, cls, name):
        '''
        
        '''
        self._name = name
        self._container_model_class = cls
        setattr(cls, name, FieldDescriptor(self))
        self._bound = True
119110
def _add_constraints(self, relation):
        
        names = []
        expression = relation.expression
        for value_set in expression.value_sets():
            name = next(self._constr_names)
            self._p.addConstr(
                self._grb_expr_from_value_set(value_set),
                self.CONSTR_SENSE_MAP[relation.sense],
                -float(expression.offset), name)
            names.append(name)

        self._p.update()

        return names
901039
def new_term(self, term, value, **kwargs):
        """"""

        tc = self.doc.get_term_class(term.lower())

        t = tc(term, value, doc=self.doc, parent=None, section=self).new_children(**kwargs)

        self.doc.add_term(t)
        return t
363160
def _add_to_graph(self, term, parents):
        
        if self._frozen:
            raise ValueError(
                "Can't mutate %s after construction." % type(self).__name__
            )

        # If we've seen this node already as a parent of the current traversal,
        # it means we have an unsatisifiable dependency.  This should only be
        # possible if the term's inputs are mutated after construction.
        if term in parents:
            raise CyclicDependency(term)

        parents.add(term)

        self.graph.add_node(term)

        for dependency in term.dependencies:
            self._add_to_graph(dependency, parents)
            self.graph.add_edge(dependency, term)

        parents.remove(term)
205320
def add_attribute_model(self,
                            name,  # type: str
                            attr,  # type: AttributeModel
                            writeable_func=None,  # type: Optional[Callable]
                            ):
        # type: (...) -> AttributeModel
        """"""
        return self._field_registry.add_attribute_model(
            name, attr, writeable_func, self._part)
259142
def add_eager_constraints(self, models):
        
        return self._query.where_in(
            self._foreign_key, self.get_keys(models, self._local_key)
        )