Skip to content

Commit 80b084d

Browse files
committed
update documentation
1 parent e856795 commit 80b084d

File tree

8 files changed

+57
-1123
lines changed

8 files changed

+57
-1123
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ vignettes/Cigar.csv
88
inst/standarderrors.pdf
99
/figure
1010
/cache
11+
/inst/doc/*.log
12+
/inst/doc/*.Rmd

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
README.html
22
inst/standarderrors.pdf
3+
inst/doc/*.log

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Package: margins
22
Type: Package
33
Title: Marginal Effects for Model Objects
44
Description: An R port of Stata's 'margins' command, which can be used to
5-
calculate marginal effects or partial effects from model objects.
5+
calculate marginal (or partial) effects from model objects.
66
License: MIT + file LICENSE
7-
Version: 0.1.25
7+
Version: 0.2.0
88
Date: 2016-08-05
99
Authors@R: c(person("Thomas J.", "Leeper",
1010
role = c("aut", "cre"),

README.Rmd

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,6 @@ Given the challenges of interpreting the contribution of a given regressor in an
3333

3434
Some technical details of the package are worth briefly noting. The estimation of marginal effects relies on numeric derivatives produced using `predict()` and [`numDeriv::grad()`](https://cran.r-project.org/package=numDeriv). While symbolic differentiation of some models (e.g., linear models) is possible using `D()` and `deriv()`, R's modelling language (the "formula" class) is sufficiently general to enable the construction of model formulae that contain terms that fall outside of R's symbolic differentiation rule table (e.g., `y ~ factor(x)` or `y ~ I(FUN(x))` for any arbitrary `FUN()`). By relying on numeric differentiation, `margins()` supports *any* model that can be expressed in R formula syntax. Even Stata's `margins` command is limited in its ability to handle variable transformations (e.g., including `x` and `log(x)` as predictors) and quadratic terms (e.g., `x^3`); these scenarios are easily expressed in an R formula and easily handled, correctly, by `margins()`.
3535

36-
## Requirements and Installation ##
37-
38-
[![CRAN](http://www.r-pkg.org/badges/version/slopegraph)](http://cran.r-project.org/web/packages/margins/index.html)
39-
[![Build Status](https://travis-ci.org/leeper/margins.svg?branch=master)](https://travis-ci.org/leeper/margins)
40-
[![Build status](https://ci.appveyor.com/api/projects/status/t6nxndmvvcw3gw7f/branch/master?svg=true)](https://ci.appveyor.com/project/leeper/margins/branch/master)
41-
[![codecov.io](http://codecov.io/github/leeper/margins/coverage.svg?branch=master)](http://codecov.io/github/leeper/margins?branch=master)
42-
[![Project Status: Wip - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
43-
44-
The development version of this package can be installed directly from GitHub using `devtools`:
45-
46-
```R
47-
if (!require("ghit")) {
48-
install.packages("ghit")
49-
library("ghit")
50-
}
51-
install_github("leeper/margins")
52-
```
53-
5436
## Simple code examples ##
5537

5638
```{r opts, echo = FALSE}
@@ -105,3 +87,21 @@ persp(x, xvar = "cyl", yvar = "wt", what = "effect", nx = 10)
10587

10688
The numerous package vignettes and help files contain extensive documentation and examples of all package functionality.
10789

90+
## Requirements and Installation ##
91+
92+
[![CRAN](http://www.r-pkg.org/badges/version/slopegraph)](http://cran.r-project.org/web/packages/margins/index.html)
93+
[![Build Status](https://travis-ci.org/leeper/margins.svg?branch=master)](https://travis-ci.org/leeper/margins)
94+
[![Build status](https://ci.appveyor.com/api/projects/status/t6nxndmvvcw3gw7f/branch/master?svg=true)](https://ci.appveyor.com/project/leeper/margins/branch/master)
95+
[![codecov.io](http://codecov.io/github/leeper/margins/coverage.svg?branch=master)](http://codecov.io/github/leeper/margins?branch=master)
96+
[![Project Status: Wip - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
97+
98+
The development version of this package can be installed directly from GitHub using `devtools`:
99+
100+
```R
101+
if (!require("ghit")) {
102+
install.packages("ghit")
103+
library("ghit")
104+
}
105+
install_github("leeper/margins", build_vignettes = FALSE)
106+
```
107+

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,6 @@ Given the challenges of interpreting the contribution of a given regressor in an
3333

3434
Some technical details of the package are worth briefly noting. The estimation of marginal effects relies on numeric derivatives produced using `predict()` and [`numDeriv::grad()`](https://cran.r-project.org/package=numDeriv). While symbolic differentiation of some models (e.g., linear models) is possible using `D()` and `deriv()`, R's modelling language (the "formula" class) is sufficiently general to enable the construction of model formulae that contain terms that fall outside of R's symbolic differentiation rule table (e.g., `y ~ factor(x)` or `y ~ I(FUN(x))` for any arbitrary `FUN()`). By relying on numeric differentiation, `margins()` supports *any* model that can be expressed in R formula syntax. Even Stata's `margins` command is limited in its ability to handle variable transformations (e.g., including `x` and `log(x)` as predictors) and quadratic terms (e.g., `x^3`); these scenarios are easily expressed in an R formula and easily handled, correctly, by `margins()`.
3535

36-
## Requirements and Installation ##
37-
38-
[![CRAN](http://www.r-pkg.org/badges/version/slopegraph)](http://cran.r-project.org/web/packages/margins/index.html)
39-
[![Build Status](https://travis-ci.org/leeper/margins.svg?branch=master)](https://travis-ci.org/leeper/margins)
40-
[![Build status](https://ci.appveyor.com/api/projects/status/t6nxndmvvcw3gw7f/branch/master?svg=true)](https://ci.appveyor.com/project/leeper/margins/branch/master)
41-
[![codecov.io](http://codecov.io/github/leeper/margins/coverage.svg?branch=master)](http://codecov.io/github/leeper/margins?branch=master)
42-
[![Project Status: Wip - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
43-
44-
The development version of this package can be installed directly from GitHub using `devtools`:
45-
46-
```R
47-
if (!require("ghit")) {
48-
install.packages("ghit")
49-
library("ghit")
50-
}
51-
install_github("leeper/margins")
52-
```
53-
5436
## Simple code examples ##
5537

5638

@@ -132,3 +114,21 @@ persp(x, xvar = "cyl", yvar = "wt", what = "effect", nx = 10)
132114

133115
The numerous package vignettes and help files contain extensive documentation and examples of all package functionality.
134116

117+
## Requirements and Installation ##
118+
119+
[![CRAN](http://www.r-pkg.org/badges/version/slopegraph)](http://cran.r-project.org/web/packages/margins/index.html)
120+
[![Build Status](https://travis-ci.org/leeper/margins.svg?branch=master)](https://travis-ci.org/leeper/margins)
121+
[![Build status](https://ci.appveyor.com/api/projects/status/t6nxndmvvcw3gw7f/branch/master?svg=true)](https://ci.appveyor.com/project/leeper/margins/branch/master)
122+
[![codecov.io](http://codecov.io/github/leeper/margins/coverage.svg?branch=master)](http://codecov.io/github/leeper/margins?branch=master)
123+
[![Project Status: Wip - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
124+
125+
The development version of this package can be installed directly from GitHub using `devtools`:
126+
127+
```R
128+
if (!require("ghit")) {
129+
install.packages("ghit")
130+
library("ghit")
131+
}
132+
install_github("leeper/margins", build_vignettes = FALSE)
133+
```
134+

0 commit comments

Comments
 (0)