How to plot x-y data and put statistics analysis on GLEON Fellowship Workshop January 14-18, 2013 Sunapee, NH Ari Santoso
Linear regression It is an example of how to plot (x-y, scattered) our data and do linear regression analysis of the data It starts from up loading the *.txt data into R, manipulate the data, and ends up with statistics and plots
Skill relevance/usefulness At a glance, R is complicated, but truly not after we dig in to it. Running R and its scripts is a good practice and start for being familiar with command line functions programming e.g. DYRSYM- CAEDYM. We can go to help() for hints, or google in its website ( or in youtubehttp://cran.r-project.org/
Application to data I used pCO2 data from 12 Rotorua lakes NZ from period Main challenges…(R it self… ) – Scripting (not friendly “click and play” GUI) – Not an easy to understand Manuals – Labeling the plot
Results > names(Rotorua) [1] "Lake" "Date" "Ts" "pCO2s" "Tb" "pCO2b"
Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) e-15 *** exRmmix$pCO2b < 2e-16 *** --- Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: on 414 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 1 and 414 DF, p-value: < 2.2e-16 Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) < 2e-16 *** exRmstr$pCO2b e-07 *** --- Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: on 714 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 1 and 714 DF, p-value: 4.47e-07