R/prod_array.R

Defines functions prod_array

prod_array <- function(X,y){

# compute product of each matrix in X by the vector y
  Z = 0
  for(j in 1:dim(X)[2]) Z = Z+X[,j,]*y[j] 
  Z

}

Try the LMest package in your browser

Any scripts or data that you put into this service are public.

LMest documentation built on Aug. 27, 2023, 5:06 p.m.