12 nov 2015

Adding statistic values to the X-Y plot

I was looking for the best way to add statistic values to the plot, and I found a way in this post  "Adding p values and R squared values to a plot using expression() ". It was really helpfull.
Just to check it I add the RSQ and Slope statistics, but the idea is to add more, so lloking to the plot you can have an idea about how the model performs.

5 nov 2015

Mixing in the Legends dots and lines

Finally I found the info to mix dot and lines in a plot, this way the plot looks nicer:
legend("topright",
        legend =c("Reg Line","Reg Line Bias Corr",

        "Current Value"","Bias adj. value"),
        bty = "n",
        col = c("brown","green4","red","black"),
        lty = c(1,1,0,0),                  

        lwd = c(2,2,0,0),                    
        pch = c(NA, NA, 15,21),           
        pt.bg = c(NA,NA,"red", "yellow"),
        pt.cex =0.5)