BookmarkSubscribe
Community Member

## Unable to make correlation analysis with list input

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 ),

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
Super User

## Re: Unable to make correlation analysis with list input

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
Super User

## Re: Unable to make correlation analysis with list input

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