Quantcast
Channel: EViews
Viewing all articles
Browse latest Browse all 24140

How to save coefficients in a ls regression?

$
0
0
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



Viewing all articles
Browse latest Browse all 24140


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>