Description Usage Arguments Value Examples
The optimal model is fit in a case where aside from some parameters, the model is linear.
Numerical optimization is used over these parameters with stats::lm()()
fitting the rest.
1 2 |
formula |
a formula describing the model |
data |
a data frame |
params |
a named vector of the parameters to be fit by numerical optimation outside of |
optimize |
a logical indicating whether |
.ocall |
used for recursive calling |
... |
additional arguments, currently ignored. |
On object of class c("plm", "lm")
which is an enhanced "lm"
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | if( require(EconData) & require(dplyr) ) {
plm( log(iGDP) - log(iK) ~ iYear,
data=Calvin %>% filter(Country=="US"))
plm( log(iGDP) - delta * iK - (1-delta) * iL ~ iYear,
data=Calvin %>% filter(Country=="US"),
params=c(delta=0.4),
optimize=FALSE )
plm( log(iGDP) - delta * iK - (1-delta) * iL ~ iYear, data=Calvin %>% filter(Country=="US"),
params=c(delta=0.4),
optimize=TRUE )
plm( log(iGDP) - delta * iK - (1-delta) * iL ~ iYear, data=Calvin %>% filter(Country=="US"),
params=c(delta=0.4), method=c("nlm", "spg"),
optimize=TRUE )
foo <- plm( log(iGDP / delta*(delta_1*iK + (1-delta_1)*iL) + (1-delta)*iQp) ~ iYear,
data=Calvin %>% filter(Country=="US"),
params=c(delta=0.5, delta_1=0.5))
foo
class(foo)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.