Hi, I've actually had problems with using R I've tried to search for an online solution but I still can't fix it.
My error is:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'y'
In addition: Warning message:
In storage.mode(v) <- "double" : NAs introduced by coercion
> attach(dataset)
The following objects are masked from dataset (pos = 3):
Age, CGPA, Employment, games, Gender, handwriting, height, relationship, school,
weight
> mod1= lm(Gender~weight+height+games)
This is roughly how my dataset looks like:
> dataset
# A tibble: 160 x 10
Gender Age Employment school CGPA height weight relationship handwriting games
<chr> <dbl> <chr> <chr> <dbl> <dbl> <dbl> <chr> <dbl> <dbl>
1 Male 19 A student Mckl 3.75 175 60 Single 7 20
2 Female 17 A student Mckl 3.16 165 53 Single 7 10
3 Male 19 A student Taylors ~ 4 175 72 Single 5 6
4 Female 19 A student Methodis~ 3.2 160 53 Taken 3 6
5 Female 19 A student MCKL 3 165 48 Taken 5 6
6 Female 18 A student Methodis~ 3.33 164 70 Single 10 8
7 Female 19 A student Methodis~ 3.58 157 41 Single 5 4
8 Male 19 A student MCKL 3.71 167 64 Taken 3 35
9 Male 20 A student MCKL 4 170 70 Single 5 60
10 Female 18 A student MCKL 3 161 45 Taken 7 6
# ... with 150 more rows