If the p value of a specific independent variable is less than 0.05 then it is considered to be a statistically significant variable. How to extract these variables from the dataset using Python ?

Share

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Need An Account, Sign Up Here

You must login to add an answer.

Need An Account, Sign Up Here

## Dipayan Sarkar

The statsmodels.regression.linear_model.OLSResults.pvalues should give you the pvalues of the respective variables. pvalues[0] should give you the pvalues of the 1st variable. You can filter out the names of the variables wherever pvalues[i]<0.05 and then use the list of variable names to filter out data as per need.

## mahima_vaidya