Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

non linear regression

# Add a new column with column1 squared
df['column2'] = df['column1']**2

# Run a regression model with educ, educ2, age, and age2
results = smf.ols('column3 ~ column1 + column2 + column4 + column5', data=df).fit()
Source by campus.datacamp.com #
 
PREVIOUS NEXT
Tagged: #linear #regression
ADD COMMENT
Topic
Name
9+3 =