Description Usage Arguments Value Author(s) References See Also Examples

Sets up control object for linear or nonlinear modeling of a response variable onto a large panel of
textual sentiment measures (and potentially other variables). See `sento_model`

for details on the
estimation and calibration procedure.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
ctr_model(
model = c("gaussian", "binomial", "multinomial"),
type = c("BIC", "AIC", "Cp", "cv"),
do.intercept = TRUE,
do.iter = FALSE,
h = 0,
oos = 0,
do.difference = FALSE,
alphas = seq(0, 1, by = 0.2),
lambdas = NULL,
nSample = NULL,
trainWindow = NULL,
testWindow = NULL,
start = 1,
do.shrinkage.x = FALSE,
do.progress = TRUE,
nCore = 1
)
``` |

`model` |
a |

`type` |
a |

`do.intercept` |
a |

`do.iter` |
a |

`h` |
an |

`oos` |
a non-negative |

`do.difference` |
a |

`alphas` |
a |

`lambdas` |
a |

`nSample` |
a positive |

`trainWindow` |
a positive |

`testWindow` |
a positive |

`start` |
a positive |

`do.shrinkage.x` |
a |

`do.progress` |
a |

`nCore` |
a positive |

A `list`

encapsulating the control parameters.

Samuel Borms, Keven Bluteau

Tibshirani and Taylor (2012). **Degrees of freedom in LASSO problems**.
*The Annals of Statistics 40, 1198-1232*, doi: 10.1214/12-AOS1003.

Zou, Hastie and Tibshirani (2007). **On the degrees of freedom of the LASSO**.
*The Annals of Statistics 35, 2173-2192*, doi: 10.1214/009053607000000127.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# information criterion based model control functions
ctrIC1 <- ctr_model(model = "gaussian", type = "BIC", do.iter = FALSE, h = 0,
alphas = seq(0, 1, by = 0.10))
ctrIC2 <- ctr_model(model = "gaussian", type = "AIC", do.iter = TRUE, h = 4, nSample = 100,
do.difference = TRUE, oos = 3)
# cross-validation based model control functions
ctrCV1 <- ctr_model(model = "gaussian", type = "cv", do.iter = FALSE, h = 0,
trainWindow = 250, testWindow = 4, oos = 0, do.progress = TRUE)
ctrCV2 <- ctr_model(model = "binomial", type = "cv", h = 0, trainWindow = 250,
testWindow = 4, oos = 0, do.progress = TRUE)
ctrCV3 <- ctr_model(model = "multinomial", type = "cv", h = 2, trainWindow = 250,
testWindow = 4, oos = 2, do.progress = TRUE)
ctrCV4 <- ctr_model(model = "gaussian", type = "cv", do.iter = TRUE, h = 0, trainWindow = 45,
testWindow = 4, oos = 0, nSample = 70, do.progress = TRUE)
``` |

sentometrics documentation built on Aug. 18, 2021, 9:06 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.