Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assign to the variable explanatory _ vars the list of column labels for the explanatory variables of interest Assign to the variable Y the data

Assign to the variable explanatory_vars the list of column labels for the explanatory variables of interest
Assign to the variable Y the data contained in the Happiness column in the df1517 dataframe
Assign to the variable X the data contained in the columns listed in explanatory_vars (hint: use the explanatory_vars list to index into the df1517 dataframe)
Add a constant column to the exogenous data X
Print the value of X to verify that it has been constructed correctlyCreate an OLS model to fit Y to X, dropping any missing data in the process, and assign the result to the variable model2
Fit model2 and assign the output to results2
Print the summary of the results in results2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions