Load the vote counts and county names for the state of Florida from the 2000 U.S. presidential election.
Use the vote counts for the two major party candidates, Bush and Gore, as predictors for the vote counts for the third-party candidate Buchanan, and plot the scatters:
Assume a model where a fixed proportion of Bush or Gore voters choose to vote for Buchanan.
f =
Linear model:
f(a,x) = a*x
Exclude the data from absentee voters, who did not use the controversial “butterfly” ballot.
Perform a bisquare weights robust fit of the model to the two data sets, excluding absentee voters.
Robust fits give outliers a low weight, so large residuals from a robust fit can be used to identify the outliers.
Calculate the residuals.
Identify large residuals as those outside the range [-500 500].
Display the counties corresponding to the outliers. Miami-Dade and Broward counties correspond to the largest predictor values. Palm Beach county, the only county in the state to use the “butterfly” ballot, corresponds to the largest residual values.
ans = 2x1 cell
{'Miami-Dade'}
{'Palm Beach'}
ans = 3x1 cell
{'Broward' }
{'Miami-Dade'}
{'Palm Beach'}