getCATickets: Get Tickets angular coefficients.

View source: R/functions.R

getCATicketsR Documentation

Get Tickets angular coefficients.

Usage

getCATickets(tickets)

Arguments

tickets

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (tickets) 
{
    tryCatch({
        wTickets <- as.data.frame(tickets[1:7])
        wlm <- c(summary(lm(wTickets[, 1] ~ index(wTickets[, 
            1])))$coefficients[2])
        if ((NROW(tickets) - 6) > 1) {
            return(c(wlm, getCATickets(tickets[-1])))
        }
        else {
            return(wlm)
        }
    }, error = function(e) {
        print(paste("Error:", e))
        return(c(-1))
    })
  }

danielfhenrique789/profitmaximization documentation built on April 5, 2025, 4:05 p.m.