I have this code:
df_logannuali <- data.frame("x" =log_annuali2[,1],"y"=log_annuali2[,2])
p <-ggplot(df_logannuali, aes(x, y))
p <- p + geom_point(alpha=2/10,shape=21,fill="blue",colour="black",size=3)+stat_smooth(method="lm", se=TRUE,formula=y ~ poly(x, 5, raw=TRUE),colour="red")
p+labs(x="Tempo (anni)",y="Sbarcato (log.t.)",title="(17) Sbarcato annuale TS")+ theme_bw() + theme(panel.border = element_blank(), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"))
the result is :
so now, how i can to obtain the value of polynomial equation like this example:
y = 560x^2+358x^3....-589x^5
and if is possible plot them on the graph? Thank you