Skip to content
Prev 301504 / 398502 Next

Extracting results from the VAR output

On Jul 27, 2012, at 4:34 AM, Rui Barradas wrote:

            
That was equivalent to the original code and does not address the  
question posed.
If colnames(data)[1] typed at the console would return exactly  
"Liabilities" then you could have used:

   row <- VARrow$varresult[[ colnames(data)[1] ]]$coefficient

The colnames(data)[1] expression will get evaluated and the character  
value substituted in the "[[" argument. I worry that may not be the  
correct solution because the name of that result is not "Liabilities"  
but rather "Liabilities.l1". You really _should_ present a better  
problem description, with at the very least the output of str(VARrow)  
or .... more preferably the output of dput(head(VARrow)).