title: data_GAN Logistic Regression in R
body: <p>I've been reading about logistical regression in R. It makes sense when there are columns/variables that actually mean something.  My columns are A, B, and C.  Column C has only 1's and 0's.  How am I to do a regression with such a limited dataset?  Any guidance or resources to read would be appreciated.</p>
  <pre><code>&gt; library(Amelia)
  &gt; library(mlbench)
  &gt; library(dplyr)
  &gt; my_data&lt;-read.csv(&quot;/Users/morenikeirving/GAN/data_GAN.csv&quot;)
  &gt; names(my_data)
  [1] &quot;A&quot; &quot;B&quot; &quot;C&quot;
  &gt; head(my_data)
          A      B  C
  1  4.4189 69.580 NA
  2 13.2019 61.250 NA
  3 25.6290 56.740  1
  4 22.2943 68.860  1
  5  0.2163 57.690 NA
  6  0.2875 72.914 NA
  &gt; summary(my_data)
         A                B               C       
   Min.   : 0.000   Min.   :33.00   Min.   :1     
   1st Qu.: 1.226   1st Qu.:59.69   1st Qu.:1     
   Median : 5.897   Median :61.87   Median :1     
   Mean   : 7.450   Mean   :65.40   Mean   :1     
   3rd Qu.:12.600   3rd Qu.:69.58   3rd Qu.:1     
   Max.   :25.800   Max.   :95.00   Max.   :1     
                                    NA's   :2923  
  &gt; missmap(my_data, col=c(&quot;blue&quot;, &quot;red&quot;), legend=FALSE)
  &gt; my_data&lt;-my_data %&gt;% mutate(C = ifelse(is.na(C),0,C))
  &gt; missmap(my_data, col=c(&quot;blue&quot;, &quot;red&quot;), legend=FALSE)
  &gt; model &lt;-glm(x~., data=my_data, family= binomial)
  Error in eval(predvars, data, env) : object 'x' not found
  &gt; #Library to read in xls file 
  &gt; library(Amelia)
  &gt; library(mlbench)
  &gt; library(dplyr)
  &gt; 
  &gt; #Read in csv file 
  &gt; my_data&lt;-read.csv(&quot;/Users/GAN/data_GAN.csv&quot;)
  &gt; 
  &gt; #Exploring Data 
  &gt; #see what's on the data frame 
  &gt; names(my_data)
  [1] &quot;A&quot; &quot;B&quot; &quot;C&quot;
  &gt; 
  &gt; #Look at first few rows of the data 
  &gt; head(my_data)
          A      B  C
  1  4.4189 69.580 NA
  2 13.2019 61.250 NA
  3 25.6290 56.740  1
  4 22.2943 68.860  1
  5  0.2163 57.690 NA
  6  0.2875 72.914 NA
  &gt; 
  &gt; #Overall picture of data; looking at first few rows revealed missing data
  &gt; summary(my_data)
         A                B               C       
   Min.   : 0.000   Min.   :33.00   Min.   :1     
   1st Qu.: 1.226   1st Qu.:59.69   1st Qu.:1     
   Median : 5.897   Median :61.87   Median :1     
   Mean   : 7.450   Mean   :65.40   Mean   :1     
   3rd Qu.:12.600   3rd Qu.:69.58   3rd Qu.:1     
   Max.   :25.800   Max.   :95.00   Max.   :1     
                                    NA's   :2923  
  &gt; #lots of NAs
  &gt; 
  &gt; #Examine missing data 
  &gt; 
  &gt; missmap(my_data, col=c(&quot;blue&quot;, &quot;red&quot;), legend=FALSE)
  &gt; 
  &gt; #Replace N/A 
  &gt; 
  &gt; my_data&lt;-my_data %&gt;% mutate(C = ifelse(is.na(C),0,C))
  &gt; 
  &gt; #Check to make sure missing values are resolved
  &gt; missmap(my_data, col=c(&quot;blue&quot;, &quot;red&quot;), legend=FALSE)
  
  </code></pre>