Skip to content

Commit

Permalink
Deleted var_p_plot. I would like to create a function that can plot t…
Browse files Browse the repository at this point in the history
…he likelihood for any parameters, not just the variance.
  • Loading branch information
j-grana6 committed Aug 9, 2012
1 parent 78f5ad8 commit 21791bf
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions statsmodels/emplike/descriptive.py
Expand Up @@ -17,10 +17,9 @@
import numpy as np
from scipy import optimize
from scipy.stats import chi2, skew, kurtosis
from matplotlib import pyplot as plt
from statsmodels.base.model import _fit_mle_newton
import itertools

from statsmodels.graphics import utils

class ELModel(object):
"""
Expand Down Expand Up @@ -803,40 +802,7 @@ def ci_var(self, lower_bound=None, upper_bound=None, sig=.05):
ul = optimize.brentq(self._ci_limits_var, endog.var(), ul)
return ll, ul

def var_p_plot(self, lower, upper, step, sig=.05):
"""
Plots the p-values of the maximum el estimate for the variance
Parameters
----------
lower: float
Lowest value of variance to be computed and plotted
upper: float
Highest value of the variance to be computed and plotted
step: float
Interval between each plot point.
sig: float
Will draw a horizontal line at 1- sig. Default= .05
This function can be helpful when trying to determine limits
in the ci_var function.
"""
sig = 1 - sig
p_vals = []
for test in np.arange(lower, upper, step):
p_vals.append(self.test_var(test)[0])
p_vals = np.asarray(p_vals)
plt.plot(np.arange(lower, upper, step), p_vals)
plt.plot(np.arange(lower, upper, step), (1 - sig) * \
np.ones(len(p_vals)))
return 'Type plt.show to see the figure'

def mean_var_contour(self, mu_l, mu_h, var_l, var_h, mu_step,
def plot_contour(self, mu_l, mu_h, var_l, var_h, mu_step,
var_step,
levs=[.2, .1, .05, .01, .001]):
"""
Expand Down

0 comments on commit 21791bf

Please sign in to comment.