Hello, I have a particular situation where a single "wrong" observation is impacting the results of a traditional regression to the point that betas become unreliable. I need a way to calculate the most likely betas. Here's an example:
set.seed(1) unknownbeta <- matrix(seq(100,500,100),25,5,byrow=TRUE) x <-matrix(runif(25*5),25) y <- rowSums(unknownbeta*x) summary(lm(y~0+x)) #gets back the unknown betas. #Now, let's introduce a single wrong data. unknownbeta[25,5] <-100 y <- rowSums(unknownbeta*x) summary(lm(y~0+x)) #every beta changes. I need to find out what are the most likely betas in the second example. There is no obvious way to know that row 25 has wrong input. I would even be happy if the conclusion was that x1:x4 are 100, 200, 300 and 400 and that x5 is zero. Thanks ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
