R/coef.SDPDm.R

Defines functions coef.SDPDm

Documented in coef.SDPDm

#' @name coef.SDPDm
#'
#' @title Extract coefficents from model of class SDPDm
#'
#' @description Method for extracting coefficients of objects of class "SDPDm"
#'
#' @method coef SDPDm
#'
#' @param object object of class "SDPDm"
#' @param ... additional arguments to be passed
#'
#' @return Coefficients extracted from the model object of class "SDPDm".
#'
#' @seealso
#' \code{SDPDm}
#'
#' @author Rozeta Simonovska

coef.SDPDm <- function(object,...) {
  if(inherits(object,"SDPDm")){
    if((object$dynamic & object$LeeYu & object$effect %in%
        c("individual","twoways")) ||
       (object$dynamic & object$DirectT & object$effect %in% c("twoways"))){
      return(object$coefficients1)
    }else{
      return(object$coefficients)
    }
  }
}
RozetaSimonovska/SDPDmod documentation built on April 14, 2024, 9:40 p.m.