Python, Data Analysis, Data Science, R, Machine Learning.
df['children_height'].values.reshape(-1, 1) x2 = sm.add_constant(x) slr = sm.OLS(y, x2) slr2 = slr.fit() print(slr2.summary()) Figure 4. Create an SLR model in Python SLR model conclusion As we can see, the output of creating an SLR model in R and Python is the same, just a different type of