ltsreg(x, y, intercept = T, popsize = <<see below>>, mutate.prob = c(0.15,0.2,0.2,0.2), random.n = <<see below>>, births.n = <<see below>>, stock = list(), maxslen = <<see below>>, stockprob = <<see below>>, nkeep = 1, quan = <<see below>>, singular.ok = F, qr.out = F)
A genetic algorithm, described in Burns (1992), is used. Individual solutions are defined by a set of observation numbers, which corresponds to a least squares fit with the specified observations. A stock of popsize individuals is produced by random sampling, then a number of random samples are taken and the best solutions are saved in the stock. During the genetic phase, two parents are picked which produce an offspring that contains a sample of the observations from the parents. The best two out of the three are retained in the stock. The best of all of the solutions found is used to compute the coefficients and the residuals. The standard random sampling algorithm can be used by setting popsize to one, maxslen to p and births.n to zero.
The mutate.prob argument controls the mutation of the offspring. The length of the offspring is initially set to be the length of the first parent. This length is reduced by one, increased by one, or given a length uniformly distributed between p and maxslen according to the last three probabilities in mutate.prob. The other type of mutation that can occur is for one of the observations of the offspring to be changed to an observation picked at random from among all of the observations; the probability of this mutation is specified by the first element of mutate.prob.
Rousseeuw, P. J. and Leroy, A. M. (1987). Robust Regression and Outlier Detection. Wiley, New York.
ltsreg(freeny.x, freeny.y)fr.lts1 <- ltsreg(freeny.x, freeny.y, nkeep = 4) ltsreg(freeny.x, freeny.y, stock = fr.lts1$stock, births = 1000)