addtomatrix function

Add rows from a matrix

Add rows from a matrix

This function adds rows from a matrix of dimension dt(k-1) times d*(k-1).

addtomatrix(C2, d, t, k)

Arguments

  • C2: a matrix of dimension dt(k-1) times d*(k-1).
  • d: number of areas.
  • t: number of time periods.
  • k: number of categories of the response variable.

Returns

C22 a matrix of dimension d*(k-1) times d*(k-1).

Examples

k=3 #number of categories of the response variable d=15 # number of areas t=2 # number of time periods mat=matrix(1,d*t*(k-1),d*(k-1)) # a matrix ##Add items in the matrix mat2=addtomatrix(mat,d,t,k)

See Also

Fbetaf.it, Fbetaf.ct, modelfit2,modelfit3

  • Maintainer: E. Lopez-Vizcaino
  • License: GPL (>= 2)
  • Last published: 2019-01-27

Useful links