Hey

I've been attempting to draw the non-parametric part of a regression on a
scatter plot, with confidence intervals if possible. Even if I tried, I
failed, reason why I'm asking here 

library(np)
library(foreign)  

wage1 <- read.dta(file="PATH HERE\\wage1.dta")
reg.np <- npplreg(lwage ~ female + married + educ + tenure | exper, data =
wage1)

plot(reg.np)

plot(wage1$exper, wage1$lwage, xlab = "age", ylab = "log(wage)")
lines(wage1$exper, fitted(reg.np), lty = 1, col = "blue")

This was one of the many attempts I tried. I'd really appreciate if someone
could help.

wage1 Database: http://www.sendspace.com/file/txksv3

Thanks!

Martín



--
View this message in context: 
http://r.789695.n4.nabble.com/Graphing-a-non-linear-regresion-line-on-a-scatter-plot-tp4649268.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org 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.

Reply via email to