Subscribe Bookmark RSS Feed

Unable to make correlation analysis with list input

kozak88

Community Member

Joined:

Jan 17, 2016

Hi all, I am having a problem with the Multivariate command.

Why doesn't this work:

numericList = {Column("age"), Column("height"), Column("weight")};

cor = Multivariate(

  Y( numericList ),

  Estimation Method( "Row-wise" ),

  Scatterplot Matrix(

  Density Ellipses( 1 ),

  Shaded Ellipses( 0 ),

  Ellipse Color( 3 )

  ),

  Pairwise Correlations( 1 )

  );


and this does:

cor =Multivariate(
Y( :age, :height, :weight ),
Estimation Method( "Row-wise" ),
Scatterplot Matrix(
Density Ellipses( 1 ),
Shaded Ellipses( 0 ),
Ellipse Color( 3 )
),
Pairwise Correlations( 1 )
);

and what do I have to do to fix it? Ofcourse i would like the command to be dynamic therefore i want the first option to work.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

All you need to do is to evaluate the list

numericList = {Column( "age" ), Column( "height" ), Column( "weight" )};

cor = Multivariate(

Y( Eval List( numericList ) ),

Estimation Method( "Row-wise" ),

Scatterplot Matrix( Density Ellipses( 1 ), Shaded Ellipses( 0 ), Ellipse Color( 3 ) ),

Pairwise Correlations( 1 )

);

Jim
1 REPLY
Solution

All you need to do is to evaluate the list

numericList = {Column( "age" ), Column( "height" ), Column( "weight" )};

cor = Multivariate(

Y( Eval List( numericList ) ),

Estimation Method( "Row-wise" ),

Scatterplot Matrix( Density Ellipses( 1 ), Shaded Ellipses( 0 ), Ellipse Color( 3 ) ),

Pairwise Correlations( 1 )

);

Jim