Hi. I'm doing a project related to face care where I have to find the relation between two categorical variables (gender (with F and M values) and type of product (normal skin, purifying, anti-age, hydrating, sensitive skin, other)).
I used the code
gender_impact <- face_prod ~ gender
but it gives me the error "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in 'y'"
How can I solve this?
The code i wrote is:
face_prod <- factor(beauty$`type of face care prod`) gender <- factor(beauty$Gender) gender_impact <- face_prod ~ gender model1 = glm(gender_impact, data=beauty, family=binomial) summary(model1)
And the result is:
glm(formula = gender_impact, family = binomial, data = beauty)
Min 1Q Median 3Q Max
-1.7642 0.6884 0.6884 0.6884 0.6884
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.3193 0.2167 6.089 1.13e-09 ***
genderM 15.2468 1385.3778 0.011 0.991
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 133.29 on 130 degrees of freedom
Residual deviance: 131.89 on 129 degrees of freedom
Number of Fisher Scoring iterations: 15
So what can I conclude? Are they related? What are the values I have to look at to understand it?