unexpected symbol for model

hi, I don't know what I have done wrong please help me.

model1=lm(`unemployment rate`~inflation rate)

I can't run the data, it keeps state that error unexpected symbol from the data

The unexpected symbol is due to the spaces between the variable names. Change the data frame, which I'll call DF and run

model1 <- lm(unemployment_rate~inflation_rate, data = DF)

I'm sorry but still cant

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

1 Like

Change the column names in the data frame, too.

In the original line of code, why are there quuotation marks around unemployment rate ?

That's an attempt to compensate for the blank.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.