Learn R Programming

mbreaks (version 1.0.0)

diag_par: Diagonal partition given break dates

Description

diag_par() partition the matrix of z regressors which coefficients are changed based on the provided break dates

Usage

diag_par(input, m, date)

Value

output: matrix of partitioned variables corresponds to break dates

Arguments

input

matrix of independent variables z with coefficients allowed to change overtime

m

number of breaks in the series

date

vector of break dates

Examples

Run this code
z = matrix(c(1:100),50,2)
m = 2  #2 breaks
date = matrix(c(15,30),2,1) #first break at t = 15; second break at t = 30
diag_par(z,m,date)

Run the code above in your browser using DataLab