Hello!
I am running a for-loop that performs a ls regression with two series (for every date). I would like to save the coefficients for the two variables for every regression in a matrix, but do not know how to do that. Are you able to help me? The matrix will have as many rows as the vector dt and 2 columns (one for each variable).
for !date = 1 to @rows(dt)
vspread = @rowextract (spread, !date)
vloptidstat = @rowextract (loptid_sak, !date)
mtos(vspread, vspreadser)
mtos(vloptidstat, vloptidstatser)
equation eq1.ls vspreadser c vloptidstatser
next
Best regards
I am running a for-loop that performs a ls regression with two series (for every date). I would like to save the coefficients for the two variables for every regression in a matrix, but do not know how to do that. Are you able to help me? The matrix will have as many rows as the vector dt and 2 columns (one for each variable).
for !date = 1 to @rows(dt)
vspread = @rowextract (spread, !date)
vloptidstat = @rowextract (loptid_sak, !date)
mtos(vspread, vspreadser)
mtos(vloptidstat, vloptidstatser)
equation eq1.ls vspreadser c vloptidstatser
next
Best regards