Thanks pylang for your reply . But i am typing each sentence
I am actually lost and unable to find out why it is throwing me an error
my code snippet is as below
###Start code here
X = dataset[“RM”]
Y = dataset[“target”]
###End code(approx 2 lines)
import statsmodel.api as sm
X= sm.add_constant(X)
then the error pops up
NameError Traceback (most recent call last)
in
----> 1 X= sm.add_constant(X)
NameError: name ‘sm’ is not defined
NameError Traceback (most recent call last)
in
----> 1 X= sm.add_constant(X)
NameError: name ‘sm’ is not defined