Hello I have a problem with my "lm" function, here is what I am asked:
"We wonder if there is on average a significant difference in the alcohol levels measured between
white and red wines. Using linear regression, test if this is the case. Formulate your
null and alternative hypotheses and perform the test at the 5% threshold. "
So I simply start by importing my database:
vin <- read.csv("vin.csv",
header = TRUE,
sep = ",",
dec = ".")
then i want to use "lm" function like this:
lm1.vin <- lm(Couleur ~ Alcool.mesure, data = vin)
but i have this error message:
"Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf dans 'y'
De plus : Warning message:
In storage.mode(v) <- "double" :
NAs introduits lors de la conversion automatique"
here is a screenshot of my database:
can you help me . have a nice day