## [1] "English_United States.1252"
This is an R Markdown document and the knitr package. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
The main pourpose of this document is to exercise the Literate Statistical Programming concept learned on the COURSERA - Reproducible Research Course.
Objectives:
External resources:
Remember to visit R Bloggers and Simply Statistics.
library(datasets)
data(iris)
summary(iris)
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100
## 1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300
## Median :5.800 Median :3.000 Median :4.350 Median :1.300
## Mean :5.843 Mean :3.057 Mean :3.758 Mean :1.199
## 3rd Qu.:6.400 3rd Qu.:3.300 3rd Qu.:5.100 3rd Qu.:1.800
## Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500
## Species
## setosa :50
## versicolor:50
## virginica :50
##
##
##
Let’s first make a pairs plot of the data.
pairs(iris)
We did an example of regression model.
##
## Call:
## lm(formula = Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width,
## data = iris)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.82816 -0.21989 0.01875 0.19709 0.84570
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.85600 0.25078 7.401 9.85e-12 ***
## Sepal.Width 0.65084 0.06665 9.765 < 2e-16 ***
## Petal.Length 0.70913 0.05672 12.502 < 2e-16 ***
## Petal.Width -0.55648 0.12755 -4.363 2.41e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3145 on 146 degrees of freedom
## Multiple R-squared: 0.8586, Adjusted R-squared: 0.8557
## F-statistic: 295.5 on 3 and 146 DF, p-value: < 2.2e-16
library(xtable)
xt <- xtable(summary(fit))
print(xt, type = "html")
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| (Intercept) | 1.8560 | 0.2508 | 7.40 | 0.0000 |
| Sepal.Width | 0.6508 | 0.0666 | 9.77 | 0.0000 |
| Petal.Length | 0.7091 | 0.0567 | 12.50 | 0.0000 |
| Petal.Width | -0.5565 | 0.1275 | -4.36 | 0.0000 |
Sys.setlocale("LC_TIME","English")
## [1] "English_United States.1252"
time <- format(Sys.time(), "%F %T %Z")
tz <- Sys.timezone()
All content generated in 2015-03-14 14:29:17 BRT in America/Sao_Paulo.