Different Specification Tests available in the StatsModels library

This recipe describes what are various Specification Tests available in the StatsModels library

Recipe Objective - What are various Specification Tests available in the StatsModels library?

The StatsModel library provides a variety of statistical tests and tools. Some can be used independently of the model, while others can be used as an extension of the model and model results. Some of the tests are as follows:

For more related projects -

https://www.dezyre.com/projects/data-science-projects/deep-learning-projects
https://www.dezyre.com/projects/data-science-projects/neural-network-projects

Residual Diagnostics and Specification Tests:

durbin_watson(resids[, axis])
Calculates the Durbin-Watson statistic.

robust_skewness(y[, axis])
Calculates the four skewness measures in Kim & White

robust_kurtosis(y[, axis, ab, dg, excess])
Calculates the four kurtosis measures in Kim & White

linear_lm(resid, exog[, func])
Lagrange multiplier test for linearity against functional alternative

Outliers and influence measures:

OLSInfluence(results)
class to calculate outlier and influence measures for OLS result

GLMInfluence(results[, resid, endog, exog, ...])
Influence and outlier measures (experimental)

MLEInfluence(results[, resid, endog, exog, ...])
Local Influence and outlier measures (experimental)

variance_inflation_factor(exog, exog_idx)
Variance inflation factor, VIF, for one exogenous variable

Goodness of Fit Tests and Measures:

gof_chisquare_discrete(distfn, arg, rvs, ...)
perform chi-square test for a random sample of a discrete distribution

kstest_exponential(x, *[, dist, pvalmethod])
The test assumed normal or exponential distribution using Lilliefors' test.

kstest_fit(x[, dist, pvalmethod])
The test assumed normal or exponential distribution using Lilliefors' test.

kstest_normal(x[, dist, pvalmethod])
The test assumed normal or exponential distribution using Lilliefors' test.

Descriptive Statistics:

describe(data[, stats, numeric, ...])
Extended descriptive statistics for data

Description(data[, stats, numeric, ...])
Extended descriptive statistics for data

Proportion:

binom_test(count, nobs[, prop, alternative])
Perform a test that the probability of success is p.

proportions_ztest(count, nobs[, value, ...])
Test for proportions based on normal (z) test

Distance Dependence Measures:

distance_covariance_test(x, y[, B, method])
The Distance Covariance (dCov) test

distance_statistics(x, y[, x_dist, y_dist])
Calculate various distance dependence statistics.

distance_correlation(x, y)
Distance correlation.

distance_covariance(x, y)
Distance covariance.

distance_variance(x)
Distance variance.

Oneway Anova:

anova_oneway(data[, groups, use_var, ...])
Oneway Anova

anova_generic(means, variances, nobs[, ...])
Oneway Anova based on summary statistics

What Users are saying..

profile image

Savvy Sahai

Data Science Intern, Capgemini
linkedin profile url

As a student looking to break into the field of data engineering and data science, one can get really confused as to which path to take. Very few ways to do it are Google, YouTube, etc. I was one of... Read More

Relevant Projects

NLP Project on LDA Topic Modelling Python using RACE Dataset
Use the RACE dataset to extract a dominant topic from each document and perform LDA topic modeling in python.

End-to-End ML Model Monitoring using Airflow and Docker
In this MLOps Project, you will learn to build an end to end pipeline to monitor any changes in the predictive power of model or degradation of data.

Build a Review Classification Model using Gated Recurrent Unit
In this Machine Learning project, you will build a classification model in python to classify the reviews of an app on a scale of 1 to 5 using Gated Recurrent Unit.

Topic modelling using Kmeans clustering to group customer reviews
In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

Build Portfolio Optimization Machine Learning Models in R
Machine Learning Project for Financial Risk Modelling and Portfolio Optimization with R- Build a machine learning model in R to develop a strategy for building a portfolio for maximized returns.

Build Regression (Linear,Ridge,Lasso) Models in NumPy Python
In this machine learning regression project, you will learn to build NumPy Regression Models (Linear Regression, Ridge Regression, Lasso Regression) from Scratch.

Machine Learning project for Retail Price Optimization
In this machine learning pricing project, we implement a retail price optimization algorithm using regression trees. This is one of the first steps to building a dynamic pricing model.

Customer Churn Prediction Analysis using Ensemble Techniques
In this machine learning churn project, we implement a churn prediction model in python using ensemble techniques.

NLP Project for Beginners on Text Processing and Classification
This Project Explains the Basic Text Preprocessing and How to Build a Classification Model in Python

Time Series Forecasting with LSTM Neural Network Python
Deep Learning Project- Learn to apply deep learning paradigm to forecast univariate time series data.