modeling

How can I code Vuong's statistical test in Python?

How can I code Vuong's statistical test in Python? Question: I need to implement Vuong’s test for non-nested models. Specifically, I have logistic-regression models that I would like to compare. I have found implementations in R and STATA online, but unfortunately I work in Python and am not familiar with those frameworks/languages. Also unfortunate is …

Total answers: 1

Dataframe cannot delete nan

Dataframe cannot delete nan Question: Ive a dataframe I created from a .csv. The Dataframe has a DatetimeIndex and and one column containing stock prices(float64). When creating the dataframe I set frequency to ‘D’ and now i have nan entries for weekends. ive tried dropna() but everytime i check with head(10) the nan’s remain. if …

Total answers: 1

Bifurcation diagram of dynamical system

Bifurcation diagram of dynamical system Question: TL:DR How can one implement a bifurcation diagram of a seasonally forced epidemiological model such as SEIR (susceptible, exposed, infected, recovered) in Python? I already know how to implement the model itself and display a sampled time series (see this stackoverflow question), but I am struggling with reproducing a …

Total answers: 1

How to build a lift chart (a.k.a gains chart) in Python?

How to build a lift chart (a.k.a gains chart) in Python? Question: I just created a model using scikit-learn which estimates the probability of how likely a client will respond to some offer. Now I’m trying to evaluate my model. For that I want to plot the lift chart. I understand the concept of lift, …

Total answers: 3

Modeling a linear system with Python

Modeling a linear system with Python Question: I would like to simulate/model a closed-loop, linear, time-invariant system (specifically a locked PLL approximation) with python. Each sub-block within the model has a known transfer function which is given in terms of complex frequency H(s) = K / ( s * tau + 1 ). Using the …

Total answers: 4