Learn R Programming

VGAM (version 0.8-2)

moffset: Makes an effective day data set

Description

Modify a matrix by shitting successive elements.

Usage

moffset(mat, roffset = 1, coffset = 1)

Arguments

mat
Data frame or matrix, which is considered to 24 hours of rows by 7 days a week of columns, or can be any matrix.
roffset, coffset
Numeric or character. The number or name of the row/column of matrix input. rows/column start as the first cell in matrix output. For example, for the alcoff, put roffset = "6" means that

Value

  • A matrix of the same dimensional as its input.

Details

In VGAM there are crash data (e.g., see crashi) and alcohol-related related datasets, and also function of rcam and plotrcam0 available. In regression analysis of main effect model or rank zero of row-column association model, it becomes more realistic using the effective days dataset. Since in the effective days datasets for example, partying on Friday night includes Saturday morning.

See Also

Rcam, rcam, plotrcam0.

Examples

Run this code
alcoff.e <- moffset(alcoff, roffset = "6")
fit0.orig <- rcam(alcoff) #default baselines are first row & col
fit0 <- rcam(alcoff.e)    #default baselines are first roe & col 

#customise rowbaseline
fit0.based <- rcam(Rcam(alcoff.e, rbaseline="11", cbaseline="Monday"))

Run the code above in your browser using DataLab