In fact, strsub is miraculous!
<>
vname = Stein["mEXOGnames"]
vnam = strsub(vname, ",", " ")
<>
vname looks like: vname= x_1,x_2,x_3
vnam = x_1 x_2 x_3
On Sat, Mar 30, 2013 at 11:44 AM, Lee Adkins <lee.adkins(a)okstate.edu> wrote:
Actually, I really do need rownames to label the coefficients from
the
variables in the list, but my problem is rather that the bundle doesn't
play well with lists so to make tables for my Stein-rules based on the
variable names automatic (using the bundle) required some trickery. I'll
visit the strsub(), which seems like a better solution than my clunker
program.
Thanks Allin...
Lee
On Sat, Mar 30, 2013 at 11:33 AM, Allin Cottrell <cottrell(a)wfu.edu> wrote:
> On Sat, 30 Mar 2013, Lee Adkins wrote:
>
> > I'm stumped on this one. I want to be able to automate the creation of a
> > results table that does not contain t-ratios or pvalues (or be able to
> > suppress the t-ratio and pvalues in modprint).
> >
> > varname(xlist) produces a string with commas separating the names, but
> the
> > rownames command wants spaces instead of commas. So far I haven't been
> able
> > to get a proper string to use with rownames using loops.
> >
> > <>
> > open broiler
> > list xlist = const 2 3 4 5
> > matrix X = { xlist }
> > vn = varname(xlist)
> > vn
>
> I presume you mean colnames() in this context. As per the help
> for colnames, you can just give the name of the list:
>
> <hansl>
> open broiler
> list xlist = const 2 3 4 5
> matrix X = { xlist }
> colnames(X, xlist)
> </hansl>
>
> However, if you need to swap out commas for spaces, you can
> use strsub(). Go to /Help/Function reference and look under
> "Strings" for related functions.
>
> Allin Cottrell
>
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
>
http://lists.wfu.edu/mailman/listinfo/gretl-users
>
--
Lee Adkins
Professor of Economics
lee.adkins(a)okstate.edu
learneconometrics.com
--
Lee Adkins
Professor of Economics
lee.adkins(a)okstate.edu
learneconometrics.com