Hi, I am looking to filter out rows in my data set, run my analysis and then removing the filter. Here is my regression. I would like to filter out a row. For example, I would like to filter out a row, "Case"=1511.
npi=lm(npi_mvmt~cnavgpi,data=df) summary(npi) resid.vs.fitt.LS%<a-%{plot(npi,1)} resid.vs.fitt.LS npi_lms=lmsreg(npi_mvmt~cnavgpi,data=df) fitted.npi_lms<-fitted(npi_lms) resid.npi_lms<-residuals(npi_lms) resid.vs.fitt.LMS %<a-%{plot(fitted.npi_lms,resid.npi_lms); title("npi_mvmt~cnavgpi")} resid.vs.fitt.LMS plot_cnavgpi_npi_mvmt %<a-%{plot(cnavgpi,npi_mvmt); abline(lm(npi_mvmt~cnavgpi,data=df),lwd=2,col=2,lty=1); abline(lmsreg(npi_mvmt~cnavgpi,data=df),lwd=2, col=3,lty=1); legend('topright',c('OLS','LMS'),lty=c(1,1),lwd=c(2.5,2.5), col=c(2,3)); title (npi_mvmt~cnavgpi) } plot_cnavgpi_npi_mvmt Best, Bryan Mac ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.