Hi,
I’m trying to automate a process. Here’s an overview of the beginning part:
-Tabulate
-Make table
-Run multivariate on all continuous columns – so I can get a correlation matrix
I’m struggling on the run multivariate part. I’m not sure how to get it to put the columns that I want in there. This works if I know the column names and stick them in this part:
Multivariate(
Y(COLUMN NAMES IN HERE),
But I won’t know the column names so I’d like to have put a list variable or something to accommodate. Any help greatly appreciated!
Here’s the whole thing:
dt = data table("wpu10");
tab1= dt<<Tabulate(
Add Table(
Column Table(
Grouping Columns( :series_id, :series_title ),
Analysis Columns( :value )
),
Row Table( Grouping Columns( :year ) )
)
);
dtTab1=tab1<<makeintodatatable;
dtTab1<< set name("dtTab1");
colnames = dtTab1<< get column names("Continuous");
colnameslist ={};
for(i=1,i<=n items(colnames), i++, insert into(colnameslist,colnames[i],1));
Multivariate(
Y(colnameslist),
Estimation Method( "Pairwise" ),
Matrix Format( "Square" ),
Scatterplot Matrix(
Density Ellipses( 1 ),
Shaded Ellipses( 0 ),
Ellipse Color( 3 )
)
)