title: Logit model output is incorrect
body: <p>I am running a Logit Model on data I found in Kaggle.</p>
  <p><a href="https://www.kaggle.com/datasets/leonardopena/top50spotify2019" rel="nofollow noreferrer">https://www.kaggle.com/datasets/leonardopena/top50spotify2019</a></p>
  <p>My goal is to predict which songs will be an international hit (TRUE). The model seems to predicting the songs that not going to be an international hit (FALSE).</p>
  <p>Could someone shed some light on why the model is predicting FALSE instead of TRUE? Appreciate all help.</p>
  <pre><code>structure(list(bpm = c(105L, 170L, 120L, 87L, 129L, 125L), 
  nrgy = c(72L, 
  71L, 42L, 38L, 71L, 94L), dnce = c(72L, 74L, 75L, 72L, 58L, 
  74L), dB = c(-7L, -4L, -8L, -8L, -8L, -1L), hit = c(TRUE, 
  TRUE, TRUE, FALSE, TRUE, FALSE)), row.names = c(8L, 80L, 
  15L, 361L, 42L, 185L), class = &quot;data.frame&quot;)
  
  dfTop50 &lt;- read.csv(&quot;SpotifyTop50country_prepared.csv&quot;, 
  row.names = 1, stringsAsFactors = FALSE)
  train &lt;- 0.7 
  nCases &lt;- nrow(dfTop50)
  
  set.seed(123)
  trainCases &lt;- sample(1:nCases, floor(train*nCases))
  
  dfTop50Train &lt;- dfTop50[ trainCases ,]
  dfTop50Test &lt;- dfTop50[ -trainCases ,]
  
  mdlA &lt;- hit ~ bpm + nrgy + dnce + dB 
  str(mdlA)
  
  rsltLogit &lt;- glm(mdlA, data = dfTop50Train, family = 
  binomial(&quot;logit&quot;))
  predLogit &lt;- predict(rsltLogit, dfTop50Test, type = 
  &quot;response&quot;)
  
  
  head(cbind(Observed = dfTop50Test$hit, Predicted = 
  predLogit))
  predLogit &lt;- factor(as.numeric(predLogit &gt; 0.5),
                  levels = c(0,1),
                  labels=c(&quot;FALSE&quot;,&quot;TRUE&quot;))
  accLogit &lt;- mean(predLogit == dfTop50Test$hit)
  describe(accLogit)
  
  tblLog &lt;- table(Predicted = predLogit,
    Observed = dfTop50Test$hit)
  View(tblLog)
  </code></pre>