Learn R Programming

RCTS (version 0.2.4)

OF_vectorized_helpfunction3: Helpfunction in OF_vectorized3()

Description

Helpfunction in OF_vectorized3()

Usage

OF_vectorized_helpfunction3(
  i,
  t,
  XBETA,
  LF,
  group_memberships,
  lgfg_list,
  Y,
  kg
)

Value

numeric: contains the contribution to the objective function of one timepoint for one time series

Arguments

i

index of individual

t

index of time

XBETA

matrixproduct of X and beta_est

LF

matrixproduct of common factors and its loadings

group_memberships

Vector with group membership for all individuals

lgfg_list

product of groupfactors and their loadings; list with length the number of groups

Y

Y: NxT dataframe with the panel data of interest

kg

vector containing the number of group factors to be estimated for all groups