User`s guide
Parametric Fitting
3-61
Example: Robust Fit
This example fits data that is assumed to contain one outlier. The data consists
of the 2000 United States presidential election results for the state of Florida.
The fit model is a first degree polynomial and the fit method is robust linear
least squares with bisquare weights.
In the 2000 presidential election, many residents of Palm Beach County,
Florida, complained that the design of the election ballot was confusing, which
they claim led them to vote for the Reform candidate Pat Buchanan instead of
the Democratic candidate Al Gore. The so-called “butterfly ballot” was used
only in Palm Beach County and only for the election-day ballots for the
presidential race. As you will see, the number of Buchanan votes for Palm
Beach is far removed from the bulk of data, which suggests that the data point
should be treated as an outlier.
To get started, load the Florida election result data from the file
flvote2k.mat,
which is provided with the toolbox.
load flvote2k
The workspace now contains these three new variables:
•
buchanan is a vector of votes for the Reform Party candidate Pat Buchanan.
•
bush is a vector of votes for the Republican Party candidate George Bush.
•
gore is a vector of votes for the Democratic Party candidate Al Gore.
Each variable contains 68 elements, which correspond to the 67 Florida
counties plus the absentee ballots. The names of the counties are given in the
variable
counties. From these variables, create two data sets with the
Buchanan votes as the response data:
buchanan vs. bush and buchanan vs.
gore.
For this example, assume that the relationship between the response and
predictor data is linear with an offset of zero.
buchanan votes = (bush votes)(m1)
buchanan votes = (gore votes)(m2)
m1 is the number of Bush votes expected for each Buchanan vote, and m2 is
the number of Gore votes expected for each Buchanan vote.