Skip to content

Commit

Permalink
Export all methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jreduardo committed Mar 16, 2019
1 parent 9c0891f commit f9bdd61
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ S3method(anova,list)
S3method(coef,flexcm)
S3method(equitest,flexcm)
S3method(equitest,list)
S3method(fitted,flexcm)
S3method(logLik,flexcm)
S3method(model.matrix,flexcm)
S3method(predict,flexcm)
S3method(print,anova.flexcm)
S3method(print,equitest.flexcm)
S3method(print,flexcm)
S3method(print,summary.flexcm)
S3method(summary,flexcm)
S3method(vcov,flexcm)
export(compute_logk)
export(compute_logz)
export(dcmp)
Expand Down
3 changes: 2 additions & 1 deletion R/inference.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ summary.flexcm <- function(object, correlation = FALSE, ...) {
}

#-----------------------------------------------------------------------
# Print method for summary COM-Poisson models
# Print method for summary flexible count models models
#' @rdname flexcm-methods
#' @export
#'
print.summary.flexcm <- function(x,
digits = max(3L, getOption("digits") - 3L),
Expand Down
2 changes: 1 addition & 1 deletion R/likelihoods.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ flexcm_fit <- function(llfun, X, y,
#' parameter for Poisson-Tweedie family. Is \code{NULL}, the power
#' parameter will be estimated.
#' @param ... Arguments to be used by \code{\link{flexcm_fit}}.
#' @return An object of class \code{cmpreg}.
#' @return An object of class \code{flexcm}.
#' @author Eduardo Jr <[email protected]>
#' @importFrom stats model.frame model.matrix model.response setNames
#' @importFrom utils modifyList capture.output
Expand Down
8 changes: 7 additions & 1 deletion R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ NULL
#-----------------------------------------------------------------------
# Print method
#' @rdname flexcm-methods
#' @export
#'
print.flexcm <- function(x, digits = max(3L, getOption("digits") - 3L)) {
print.flexcm <- function(x,
digits = max(3L, getOption("digits") - 3L),
...) {
name <- `_get_model_name`(x$model)
cat(sprintf("\n%s regression models", name), sep = "")
cat("\nCall: ",
Expand Down Expand Up @@ -46,6 +49,7 @@ print.flexcm <- function(x, digits = max(3L, getOption("digits") - 3L)) {
#-----------------------------------------------------------------------
# Get the log-likelihood
#' @rdname flexcm-methods
#' @export
#'
logLik.flexcm <- function(object, ...) {
if (!missing(...))
Expand All @@ -71,6 +75,7 @@ coef.flexcm <- function(object, ...) {
#-----------------------------------------------------------------------
# Get the variance-covariance matrix
#' @rdname flexcm-methods
#' @export
#'
vcov.flexcm <- function(object, ...) {
if (!missing(...))
Expand All @@ -81,6 +86,7 @@ vcov.flexcm <- function(object, ...) {
#-----------------------------------------------------------------------
# Get the design matrices
#' @rdname flexcm-methods
#' @export
#'
model.matrix.flexcm <- function(object, ...) {
if (!missing(...))
Expand Down
1 change: 1 addition & 0 deletions R/predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ predict.flexcm <- function(object,
#-----------------------------------------------------------------------
# Fitted method
#' @rdname flexcm-methods
#' @export
#'
fitted.flexcm <- function(object, ...) {
object$fitted
Expand Down

0 comments on commit f9bdd61

Please sign in to comment.