##Analysis of general elections and candidates performance

ggplot(camp, aes(
  x = factor(Local_Embeddedness),
  y = Vote_Share_Percentage
)) +
  geom_boxplot(outlier.shape = NA, fill = "lightgrey", alpha = 0.5) +
  labs(
    x = "Local Embeddedness of the Candidate", 
    y = "Vote Share Percentage", 
    title = "Boxplot Showing Voteshare of Candidates by Local Embeddedness"
  ) +
  theme_minimal() +
  theme(
    axis.text.x = element_text(angle = 0, hjust = 0.5)
  )

ggplot(camp, aes(
  x = factor(Local_Embeddedness_2019),
  y = Vote_Share_Percentage
)) +
  geom_boxplot(outlier.shape = NA, fill = "lightgrey", alpha = 0.5) +
  labs(
    x = "Local Embeddedness of the Candidate", 
    y = "Vote Share Percentage", 
    title = "Boxplot Showing Voteshare of Candidates by Local Embeddedness"
  ) +
  theme_minimal() +
  theme(
    axis.text.x = element_text(angle = 0, hjust = 0.5)
  )

## `summarise()` has grouped output by 'Defection.From.Another.Party.after.2014'.
## You can override using the `.groups` argument.
Years between which candidate(winner and runner-up) changed their party
Year Frequency Proportion (%)
changed party between 2015-2019 20 12.58
changed party between 2020-2024 37 23.27
Not Changed or changed before 2014 102 64.15
Proportion of candidates who changed party after 2014
Year Frequency Proportion (%)
Didnot change party 97 61.01
Shifted party after 2014 62 38.99
Proportion of candidates who changed party after 2019
Year Frequency Proportion (%)
Changed party after 2019 37 23.27
Did not change party 122 76.73
Whether candidate came from different State
State Category Total Count Relative Proportion
No 150 0.943
Yes 9 0.057
Whether candidate came from different constituency
Category Frequency Proportion
No 94 0.591
Yes 65 0.409
Percentage of candidates changed in a constituency
Category Frequency Proportion (%)
Candidate changed in the Constituency 65 40.88
Contested by Alliance Partner in Past 34 21.38
Re-given Ticket 60 37.74
Frequency and Proportion Table for Number of Times a Person Changed Their Party
Category Frequency Proportion (%)
Changed 1 time 37 23.27
Changed 2 to 3 times 27 16.98
Changed more than 4 times 7 4.40
Never changed 88 55.35
Whether candidate came from different constituency and their position in the election
1 2
No 0.44 0.56
Yes 0.58 0.42
Party and whether candidate came from different constituency in 2024 elections
No Yes
India Alliance 0.58 0.42
NDA 0.60 0.40
Proportion of candidates by party-shifting period and their party affiliation
India Alliance NDA
changed party between 2015-2019 0.25 0.75
changed party between 2020-2024 0.84 0.16
Not Changed or changed before 2014 0.42 0.58
Proportion of candidates shifting party before 2019 and their party affiliation
India Alliance NDA
Changed party after 2019 0.84 0.16
Did not change party 0.39 0.61
Proportion of candidates shifting party before 2014 and their party affiliation
India Alliance NDA
Didnot change party 0.44 0.56
Shifted party after 2014 0.58 0.42
Proportion of candidates changed within a constituency by their political parties
India Alliance NDA
Candidate changed in the Constituency 0.49 0.32
Contested by Alliance Partner in Past 0.41 0.03
Re-given Ticket 0.10 0.65
Position of candidates changed within a constituency and their position in the election
1 2
Candidate changed in the Constituency 0.52 0.48
Contested by Alliance Partner in Past 0.56 0.44
Re-given Ticket 0.43 0.57
Proportion of number of times changed shifted political affiliations and their party
India Alliance NDA
Changed 1 time 0.24 0.22
Changed 2 to 3 times 0.22 0.12
Changed more than 4 times 0.05 0.04
Never changed 0.49 0.61
Proportion of number of times candidate changed shifted political affiliations and their position in the elections
1 2
Changed 1 time 0.41 0.59
Changed 2 to 3 times 0.48 0.52
Changed more than 4 times 0.71 0.29
Never changed 0.52 0.48
Proportion of candidates by party-shifting period and their position in the 2024 election
1 2
changed party between 2015-2019 0.50 0.50
changed party between 2020-2024 0.43 0.57
Not Changed or changed before 2014 0.52 0.48
Average voteshare of changed and unchanged candidate within a constituency
Whether_Party_changed_the_candidate mean_vote_share
Candidate changed in the Constituency 44.61577
Contested by Alliance Partner in Past 42.41567
Re-given Ticket 43.60801
Average voteshare of candidate as per their party shifting period
Year_when_candidate_changed_the_party mean_vote_share
Not Changed or changed before 2014 44.42424
changed party between 2015-2019 42.15008
changed party between 2020-2024 42.82066
Average voteshare of candidate who were from the constituency and who came from outside
From.different.constituency mean_vote_share
No 43.13643
Yes 44.67406
No of time candidate changed the party and their average voteshare
Number_of_time_Candidate_Changed_party mean_vote_share
Changed 1 time 42.36781
Changed 2 to 3 times 42.75716
Changed more than 4 times 45.30529
Never changed 44.53919
## 
## Regression Models: Predicting Vote Share, Margin, and Turnout
## ===============================================================
##                                     Dependent variable:        
##                             -----------------------------------
##                             Vote Share % Margin %  Turnout 2024
##                                 (1)         (2)        (3)     
## ---------------------------------------------------------------
## Times Defected                 0.622      -1.499      0.267    
##                               (0.655)     (1.400)    (0.355)   
##                                                                
## Year of Party Change           -0.001      0.002     -0.0003   
##                               (0.001)     (0.002)    (0.0004)  
##                                                                
## From Different Constituency    1.689      -0.746      -0.520   
##                               (1.070)     (2.288)    (0.581)   
##                                                                
## Party Changed Candidate        -1.620     -3.738      -1.019   
##                               (1.438)     (3.073)    (0.780)   
##                                                                
## Muslim %                       -0.777      1.321      0.128    
##                               (1.186)     (2.536)    (0.643)   
##                                                                
## SC %                           -0.013     -0.021     0.184***  
##                               (0.051)     (0.108)    (0.027)   
##                                                                
## Rural %                        -0.128     -0.194     0.303***  
##                               (0.115)     (0.246)    (0.062)   
##                                                                
## ruralPercent_pcs               -0.027     -0.036      0.015    
##                               (0.028)     (0.060)    (0.015)   
##                                                                
## Constant                     49.409***   26.687***  46.174***  
##                               (3.340)     (7.141)    (1.812)   
##                                                                
## ---------------------------------------------------------------
## Observations                    159         159        159     
## R2                             0.070       0.036      0.273    
## Adjusted R2                    0.020      -0.016      0.235    
## ===============================================================
## Note:                               *p<0.1; **p<0.05; ***p<0.01
Mean Vote Share and Sample Size by Defection Status, Constituency Change, and Alliance
From Different Constituency No Defection After 2014 Defection After 2014
No India Alliance: 43.2 (n=26) NDA: 43.8 (n=34)
India Alliance: 43.7 (n=20)
NDA: 40.7 (n=14
Yes India Alliance: 46.7 (n=17) NDA: 44.5 (n=20)
India Alliance: 42.8 (n=16)
NDA: 44.6 (n=12
Mean Vote Share of candidates who defected after 2019 and came from different constituency
From Different Constituency Changed Party After 2019 Did Not Change Party After 2019
No India Alliance: 43.5 (n=17) NDA: 38.8 (n=3)
India Alliance: 43.4 (n=29)
NDA: 43.1 (n=45
Yes India Alliance: 42.5 (n=14) NDA: 44.7 (n=3)
India Alliance: 46.5 (n=19)
NDA: 44.5 (n=29
## 
## Effect of Local Embeddedness
## =======================================================
##                                Dependent variable:     
##                           -----------------------------
##                                     Modi2024           
##                              (1)       (2)       (3)   
## -------------------------------------------------------
## Local Embeddedness (2019)  -0.028    -0.047    -0.034  
##                            (0.114)   (0.124)   (0.126) 
## BJP 2024 Vote Share                   0.009     0.014  
##                                      (0.011)   (0.013) 
## Diff BJP Vote Share                             0.022  
##                                                (0.020) 
## Margin Percentage                              -0.003  
##                                                (0.006) 
## Turnout Change from 2019                        0.036  
##                                                (0.029) 
## Turnout 2024                                    0.006  
##                                                (0.017) 
## Constant                   0.444**    0.074    -0.183  
##                            (0.183)   (0.537)   (1.268) 
## -------------------------------------------------------
## Observations                 77        72        72    
## R2                          0.001     0.013     0.052  
## Adjusted R2                -0.013    -0.015    -0.035  
## =======================================================
## Note:                       *p<0.1; **p<0.05; ***p<0.01
## 
## Effect of Local Embeddedness
## ======================================================
##                               Dependent variable:     
##                          -----------------------------
##                                    Modi2024           
##                             (1)        (2)      (3)   
## ------------------------------------------------------
## Local Embeddedness         0.035      0.024    0.036  
##                           (0.092)    (0.097)  (0.100) 
## BJP 2024 Vote Share                   0.010    0.014  
##                                      (0.011)  (0.013) 
## Diff BJP Vote Share                            0.023  
##                                               (0.020) 
## Margin Percentage                              -0.003 
##                                               (0.006) 
## Turnout Change from 2019                       0.037  
##                                               (0.029) 
## Turnout 2024                                   0.005  
##                                               (0.017) 
## Constant                  0.359***   -0.053    -0.233 
##                           (0.132)    (0.496)  (1.251) 
## ------------------------------------------------------
## Observations                 77        72        72   
## R2                         0.002      0.012    0.053  
## Adjusted R2                -0.011    -0.016    -0.034 
## ======================================================
## Note:                      *p<0.1; **p<0.05; ***p<0.01
library(ggplot2)

ggplot(camp, aes(x = Margin_Percentage, y = turnout_2024)) +
  geom_point(color = "steelblue", alpha = 0.7, size = 2) +
  geom_smooth(method = "lm", se = TRUE, color = "darkred", linetype = "dashed") +
  labs(
    title = "Relationship Between Margin Percentage and Turnout (2024)",
    x = "Margin Percentage",
    y = "Turnout Percentage (2024)"
  ) +
  theme_minimal(base_size = 14) +
  theme(
    plot.title = element_text(hjust = 0.5)
  )
## `geom_smooth()` using formula = 'y ~ x'

## 
## ===============================================================================================
##                                                 Dependent variable:                            
##                     ---------------------------------------------------------------------------
##                                                   Bjp24voteshare                               
##                            (1)                (2)                (3)                (4)        
## -----------------------------------------------------------------------------------------------
## Modi2024                  1.183                                                    2.162       
##                          (1.315)                                                  (2.960)      
##                                                                                                
## Local_Embeddedness                           -0.295                                0.035       
##                                             (1.071)                               (1.452)      
##                                                                                                
## Int_bw_le_Rally                                                 0.383              -0.712      
##                                                                (0.797)            (1.943)      
##                                                                                                
## Constant                43.195***          44.041***          43.475***          43.123***     
##                          (0.917)            (1.536)            (0.856)            (2.069)      
##                                                                                                
## -----------------------------------------------------------------------------------------------
## Observations                72                 72                 72                 72        
## R2                        0.011              0.001              0.003              0.015       
## Adjusted R2               -0.003             -0.013             -0.011             -0.029      
## Residual Std. Error  6.350 (df = 70)    6.383 (df = 70)    6.376 (df = 70)    6.432 (df = 68)  
## F Statistic         0.810 (df = 1; 70) 0.076 (df = 1; 70) 0.231 (df = 1; 70) 0.337 (df = 3; 68)
## ===============================================================================================
## Note:                                                               *p<0.1; **p<0.05; ***p<0.01
## 
## ===============================================================================================
##                                                 Dependent variable:                            
##                     ---------------------------------------------------------------------------
##                                                 Diff_BJP_voteshare                             
##                            (1)                (2)                (3)                (4)        
## -----------------------------------------------------------------------------------------------
## Modi2024                  0.750                                                    0.256       
##                          (0.765)                                                  (1.723)      
##                                                                                                
## Local_Embeddedness                           0.123                                 -0.072      
##                                             (0.624)                               (0.845)      
##                                                                                                
## Int_bw_le_Rally                                                 0.468              0.361       
##                                                                (0.462)            (1.131)      
##                                                                                                
## Constant                -7.326***          -7.179***          -7.265***          -7.222***     
##                          (0.533)            (0.895)            (0.496)            (1.205)      
##                                                                                                
## -----------------------------------------------------------------------------------------------
## Observations                72                 72                 72                 72        
## R2                        0.014              0.001              0.014              0.015       
## Adjusted R2               -0.001             -0.014             0.0004             -0.028      
## Residual Std. Error  3.695 (df = 70)    3.719 (df = 70)    3.693 (df = 70)    3.745 (df = 68)  
## F Statistic         0.960 (df = 1; 70) 0.039 (df = 1; 70) 1.026 (df = 1; 70) 0.355 (df = 3; 68)
## ===============================================================================================
## Note:                                                               *p<0.1; **p<0.05; ***p<0.01
## 
## ===============================================================================================
##                                                 Dependent variable:                            
##                     ---------------------------------------------------------------------------
##                                                  Margin_Percentage                             
##                            (1)                (2)                (3)                (4)        
## -----------------------------------------------------------------------------------------------
## Modi2024                  -1.772                                                   6.190       
##                          (2.631)                                                  (5.748)      
##                                                                                                
## Local_Embeddedness                           1.779                                 5.074*      
##                                             (2.074)                               (2.757)      
##                                                                                                
## Int_bw_le_Rally                                                 -1.321             -5.962      
##                                                                (1.587)            (3.778)      
##                                                                                                
## Constant                20.836***          17.653***          20.809***          14.402***     
##                          (1.824)            (3.023)            (1.696)            (3.911)      
##                                                                                                
## -----------------------------------------------------------------------------------------------
## Observations                77                 80                 77                 77        
## R2                        0.006              0.009              0.009              0.053       
## Adjusted R2               -0.007             -0.003             -0.004             0.014       
## Residual Std. Error  13.029 (df = 75)   13.108 (df = 78)   13.008 (df = 75)   12.890 (df = 73) 
## F Statistic         0.453 (df = 1; 75) 0.736 (df = 1; 78) 0.693 (df = 1; 75) 1.365 (df = 3; 73)
## ===============================================================================================
## Note:                                                               *p<0.1; **p<0.05; ***p<0.01
## 
## ===============================================================================================
##                                                 Dependent variable:                            
##                     ---------------------------------------------------------------------------
##                                                turnoutchangefrom2019                           
##                            (1)                (2)                (3)                (4)        
## -----------------------------------------------------------------------------------------------
## Modi2024                  0.516                                 1.926              1.926       
##                          (0.561)                               (1.241)            (1.241)      
##                                                                                                
## Local_Embeddedness                           -0.065             0.412              0.412       
##                                             (0.451)            (0.595)            (0.595)      
##                                                                                                
## Int_bw_le_Rally                                                 -1.036             -1.036      
##                                                                (0.816)            (0.816)      
##                                                                                                
## Constant                -2.445***          -2.157***          -2.988***          -2.988***     
##                          (0.389)            (0.646)            (0.844)            (0.844)      
##                                                                                                
## -----------------------------------------------------------------------------------------------
## Observations                77                 77                 77                 77        
## R2                        0.011              0.0003             0.033              0.033       
## Adjusted R2               -0.002             -0.013             -0.007             -0.007      
## Residual Std. Error  2.776 (df = 75)    2.791 (df = 75)    2.782 (df = 73)    2.782 (df = 73)  
## F Statistic         0.847 (df = 1; 75) 0.021 (df = 1; 75) 0.831 (df = 3; 73) 0.831 (df = 3; 73)
## ===============================================================================================
## Note:                                                               *p<0.1; **p<0.05; ***p<0.01
## 
## ===============================================================================================
##                                                 Dependent variable:                            
##                     ---------------------------------------------------------------------------
##                                                   turnout_2024.x                               
##                            (1)                (2)                (3)                (4)        
## -----------------------------------------------------------------------------------------------
## Modi2024                  0.019                                                    -0.021      
##                          (0.833)                                                  (0.832)      
##                                                                                                
## Local_Embeddedness                           0.847                                 0.743       
##                                             (0.638)                               (0.666)      
##                                                                                                
## Int_bw_le_Rally                                                 -0.178                         
##                                                                (0.502)                         
##                                                                                                
## Constant                56.946***          55.967***          57.046***          56.036***     
##                          (0.577)            (0.931)            (0.537)            (0.998)      
##                                                                                                
## -----------------------------------------------------------------------------------------------
## Observations                77                 80                 77                 77        
## R2                       0.00001             0.022              0.002              0.017       
## Adjusted R2               -0.013             0.010              -0.012             -0.010      
## Residual Std. Error  4.122 (df = 75)    4.035 (df = 78)    4.119 (df = 75)    4.116 (df = 74)  
## F Statistic         0.001 (df = 1; 75) 1.761 (df = 1; 78) 0.126 (df = 1; 75) 0.623 (df = 2; 74)
## ===============================================================================================
## Note:                                                               *p<0.1; **p<0.05; ***p<0.01
## Warning: package 'pander' was built under R version 4.4.3
Local_Embeddedness Mean_BJP_Voteshare
0 44.56
1 42.95
2 43.78
regbvs <- lm(Bjp24voteshare~ Modi2024 ,rally_dataset_final)

egbvs3 <- lm(Bjp24voteshare~  Local_Embeddedness_2019 ,rally_dataset_final)

regbvs4 <- lm(Bjp24voteshare~ Int_bw_le_Rally,rally_dataset_final)

egbvs2 <- lm(Bjp24voteshare~ Modi2024 + Int_bw_le_Rally+ Local_Embeddedness_2019 ,rally_dataset_final)



stargazer(regbvs, egbvs3, regbvs4, egbvs2, type= "text")
## 
## ===================================================================================================
##                                                     Dependent variable:                            
##                         ---------------------------------------------------------------------------
##                                                       Bjp24voteshare                               
##                                (1)                (2)                (3)                (4)        
## ---------------------------------------------------------------------------------------------------
## Modi2024                      1.183                                                    0.810       
##                              (1.315)                                                  (2.835)      
##                                                                                                    
## Local_Embeddedness_2019                          -1.389                                -1.442      
##                                                 (1.353)                               (1.694)      
##                                                                                                    
## Int_bw_le_Rally                                                     0.383              0.213       
##                                                                    (0.797)            (1.780)      
##                                                                                                    
## Constant                    43.195***          45.793***          43.475***          45.439***     
##                              (0.917)            (2.198)            (0.856)            (2.824)      
##                                                                                                    
## ---------------------------------------------------------------------------------------------------
## Observations                    72                 72                 72                 72        
## R2                            0.011              0.015              0.003              0.025       
## Adjusted R2                   -0.003             0.001              -0.011             -0.018      
## Residual Std. Error      6.350 (df = 70)    6.339 (df = 70)    6.376 (df = 70)    6.398 (df = 68)  
## F Statistic             0.810 (df = 1; 70) 1.053 (df = 1; 70) 0.231 (df = 1; 70) 0.582 (df = 3; 68)
## ===================================================================================================
## Note:                                                                   *p<0.1; **p<0.05; ***p<0.01
regtp <- lm(turnout_2024.x~ Modi2024 ,rally_dataset_final)

egtp1 <- lm(turnout_2024.x~  Local_Embeddedness_2019 ,rally_dataset_final)

regtp3 <- lm(turnout_2024.x~  Int_bw_le_Rally ,rally_dataset_final)

egtp2 <- lm(turnout_2024.x~ Modi2024 + Local_Embeddedness_2019 ,rally_dataset_final)

stargazer(regtp, egtp1, regtp3, egtp2, type = "text")
## 
## ===================================================================================================
##                                                     Dependent variable:                            
##                         ---------------------------------------------------------------------------
##                                                       turnout_2024.x                               
##                                (1)                (2)                (3)                (4)        
## ---------------------------------------------------------------------------------------------------
## Modi2024                      0.019                                                    0.030       
##                              (0.833)                                                  (0.837)      
##                                                                                                    
## Local_Embeddedness_2019                          0.490                                 0.364       
##                                                 (0.799)                               (0.825)      
##                                                                                                    
## Int_bw_le_Rally                                                     -0.178                         
##                                                                    (0.502)                         
##                                                                                                    
## Constant                    56.946***          56.300***          57.046***          56.394***     
##                              (0.577)            (1.301)            (0.537)            (1.381)      
##                                                                                                    
## ---------------------------------------------------------------------------------------------------
## Observations                    77                 80                 77                 77        
## R2                           0.00001             0.005              0.002              0.003       
## Adjusted R2                   -0.013             -0.008             -0.012             -0.024      
## Residual Std. Error      4.122 (df = 75)    4.071 (df = 78)    4.119 (df = 75)    4.145 (df = 74)  
## F Statistic             0.001 (df = 1; 75) 0.375 (df = 1; 78) 0.126 (df = 1; 75) 0.097 (df = 2; 74)
## ===================================================================================================
## Note:                                                                   *p<0.1; **p<0.05; ***p<0.01
ggplot(camp, aes(x = turnout_2024, y = turnout2019)) +
  geom_point(color = "steelblue", alpha = 0.7, size = 2) +
  geom_smooth(method = "lm", se = TRUE, color = "darkred", linetype = "dashed") +
  labs(
    title = "Turnout in 2024 vs Turnout in 2019",
    x = "Turnout Percentage (2024)",
    y = "Turnout Percentage (2019)"
  ) +
  theme_minimal(base_size = 14) +
  theme(
    plot.title = element_text(hjust = 0.5)
  )
## `geom_smooth()` using formula = 'y ~ x'

## 
## ===============================================
##                         Dependent variable:    
##                     ---------------------------
##                            turnout_2024        
## -----------------------------------------------
## Local_Embeddedness            -0.073           
##                               (0.266)          
##                                                
## turnout2019                  0.707***          
##                               (0.041)          
##                                                
## Constant                     15.247***         
##                               (2.432)          
##                                                
## -----------------------------------------------
## Observations                    159            
## R2                             0.656           
## Adjusted R2                    0.651           
## Residual Std. Error      2.388 (df = 156)      
## F Statistic          148.590*** (df = 2; 156)  
## ===============================================
## Note:               *p<0.1; **p<0.05; ***p<0.01
## 
## ===================================================
##                             Dependent variable:    
##                         ---------------------------
##                            Vote_Share_Percentage   
## ---------------------------------------------------
## Local_Embeddedness_2019           -0.342           
##                                   (0.786)          
##                                                    
## Constant                         44.230***         
##                                   (1.190)          
##                                                    
## ---------------------------------------------------
## Observations                        159            
## R2                                 0.001           
## Adjusted R2                       -0.005           
## Residual Std. Error          6.605 (df = 157)      
## F Statistic                 0.189 (df = 1; 157)    
## ===================================================
## Note:                   *p<0.1; **p<0.05; ***p<0.01
## 
## ===================================================
##                             Dependent variable:    
##                         ---------------------------
##                              Margin_Percentage     
## ---------------------------------------------------
## Local_Embeddedness_2019            0.131           
##                                   (1.652)          
##                                                    
## Constant                         19.136***         
##                                   (2.499)          
##                                                    
## ---------------------------------------------------
## Observations                        159            
## R2                                0.00004          
## Adjusted R2                       -0.006           
## Residual Std. Error          13.877 (df = 157)     
## F Statistic                 0.006 (df = 1; 157)    
## ===================================================
## Note:                   *p<0.1; **p<0.05; ***p<0.01
## 
## ===================================================
##                             Dependent variable:    
##                         ---------------------------
##                               turnout_change       
## ---------------------------------------------------
## Local_Embeddedness_2019           -0.049           
##                                   (0.327)          
##                                                    
## Constant                         -2.149***         
##                                   (0.495)          
##                                                    
## ---------------------------------------------------
## Observations                        159            
## R2                                0.0001           
## Adjusted R2                       -0.006           
## Residual Std. Error          2.748 (df = 157)      
## F Statistic                 0.022 (df = 1; 157)    
## ===================================================
## Note:                   *p<0.1; **p<0.05; ***p<0.01
Average difference in turnout when candidates where from same constituency VS different
Candidate_from_different_constituency mean_turnout_perc
Both Different -2.403235
Both Same -2.652698
One Different -1.667742
Average Mobilization when candidat came from differen constituency
Candidate_from_different_constituency Mobilization_mean
Both Different 2439.240
Both Same 2553.789
One Different 2467.833
Average turnout when candidates were from different vs same constituency
Candidate_from_different_constituency mean_turnout
Both Different 57.35265
Both Same 57.81905
One Different 56.03516
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

## Warning: Removed 47 rows containing non-finite outside the scale range
## (`stat_density()`).

dis <-lm(formula = turnout_change~ Candidate_changed_party_after_2019 + 
    From.different.constituency, data = camp)

stargazer(dis, type = "text")
## 
## ==================================================================================
##                                                            Dependent variable:    
##                                                        ---------------------------
##                                                              turnout_change       
## ----------------------------------------------------------------------------------
## Candidate_changed_party_after_2019Did not change party            0.270           
##                                                                  (0.517)          
##                                                                                   
## From.different.constituencyYes                                    0.289           
##                                                                  (0.444)          
##                                                                                   
## Constant                                                        -2.540***         
##                                                                  (0.496)          
##                                                                                   
## ----------------------------------------------------------------------------------
## Observations                                                       159            
## R2                                                                0.004           
## Adjusted R2                                                      -0.009           
## Residual Std. Error                                         2.751 (df = 156)      
## F Statistic                                                0.329 (df = 2; 156)    
## ==================================================================================
## Note:                                                  *p<0.1; **p<0.05; ***p<0.01