0

Say I have the dummy dataset (not the real one I'm using but similar construction):

Room_Count Markers_Used Crayons_Used
20 0.45 242.2
14 0.11 212.7
11 4.32 74.5

When I run the R code:

m <- lm(Room_Count ~ Markers_Used + Crayons_Used)

I'm getting from in the output of summary(m):

Coefficients: 

(Intercept)

Markers_Used0.45

Markers_Used0.11

Markers_Used4.32

Crayons_Used

The Crayons_Used intercept is returned as I would expect with just the column name and pertinent stat info. The Markers_Used one is returning the rows of the table as intercepts when I just want Markers_Used to be returned.

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
Kostas
  • 3
  • 3
  • 2
    It sounds like your data was imported as strings rather than numeric values. Go back to your import stage and check the `class()` of all your data. You likely have non-numeric values in there or something. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. What you have provided does not produce the output you've shown. – MrFlick Apr 30 '21 at 19:39
  • Yep that was it. Thanks – Kostas May 04 '21 at 18:01

0 Answers0