I need help with the missing code.
python
# Q2.3. Conduct a regression model for the followingequation.# Y = b0 + a X1 + b X2 where Y is Return, X1 is PE Ratio, and X2 isRisk.
# In[ ]:
Y = df['?']X = df['?']result = smf.ols(formula = '?', data = df).fit()print(result.summary())print(result.params)
# Q2.4: Conduct a regression model for the followingequation.# Y = b0 + a X1 + b X2 + c X3 + d X4 # where Y is Return, X1 is PE Ratio, and X2 is Risk, X3 is X1 ^2and X4 is X2^2
# In[ ]:
Y = df['Return']# add a new column called 'X3' whoch is Risk^2df['X3'] = pd.'?(df'?')# add a new column called 'X4' whoch is Risk^2df['X4'] = pd.'?'(df'?')X = df[[?]]result = smf.ols(formula = '?', data = df).fit()print(result.summary())print(result.params)
I need help with the missing code. python # Q2.3. Conduct a regression model for the following equation. # Y = b0 + a X1
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am