BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
marelizgrav
Calcite | Level 5

Hello,

I am trying to perform a two-group discriminant analysis but I think my plot looks funny. It is suspicious to me that all of my samples within each group are horizontally spread across the same Canonical1 variable. Is this normal? Thank you for your help. 

marelizgrav_0-1653084175308.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello @marelizgrav ,

 

It seems all your measurements are 0 for canonical variable 2.

Missing would be OK for me, but 0 is indeed weird.

 

Here's the number of canonical variables computed by SAS PROC CANDISC.

<<

NCAN=n

specifies the number of canonical variables to be computed. The value of n must be less than or equal to the number of variables. If you specify NCAN=0, the procedure displays the canonical correlations but not the canonical coefficients, structures, or means. A negative value suppresses the canonical analysis entirely. Let v be the number of variables in the VAR statement, and let c be the number of classes. If you omit the NCAN= option, only min( v , c-1 ) canonical variables are generated; if you also specify an OUT= output data set, v canonical variables are generated, and the last canonical variables have missing values.

>>

 

So for two classes, min( v , c-1 ) = 1.

Hence, by default, only 1 canonical variable is generated !

 

Cheers,

Koen

View solution in original post

7 REPLIES 7
sbxkoenk
SAS Super FREQ

Hello,

 

Is it possible to put your code into this topic thread?

When replying, hit the "running man" icon in the toolbar and ( copy / ) paste your code in the window that pops up. That way, code formatting and structure is preserved.

 

I think you are doing a canonical discriminant analysis and using CANDISC Procedure, is that correct?

 

What you see is of course possible.

Canonical discriminant analysis finds linear combinations of the quantitative variables that provide maximal separation between classes or groups. The first canonical variable is already doing all the separation (so it seems).

 

Thanks,

Koen

marelizgrav
Calcite | Level 5

Hello,

Thanks for your response. Apologies, I didn't realize I was in SAS and not JMP, since the login is the same for the community groups. I asked my question over in the JMP group and sadly no response yet.

 

Yes, you are correct that I did a canonical discriminant analysis. So am I to understand correctly from your response that, if I only have two groups, I should expect for the variables to be spread along Canonical 1? So this graph looks normal for two-group CDA? Thanks for your patience. 

sbxkoenk
SAS Super FREQ

Hello @marelizgrav ,

 

It seems all your measurements are 0 for canonical variable 2.

Missing would be OK for me, but 0 is indeed weird.

 

Here's the number of canonical variables computed by SAS PROC CANDISC.

<<

NCAN=n

specifies the number of canonical variables to be computed. The value of n must be less than or equal to the number of variables. If you specify NCAN=0, the procedure displays the canonical correlations but not the canonical coefficients, structures, or means. A negative value suppresses the canonical analysis entirely. Let v be the number of variables in the VAR statement, and let c be the number of classes. If you omit the NCAN= option, only min( v , c-1 ) canonical variables are generated; if you also specify an OUT= output data set, v canonical variables are generated, and the last canonical variables have missing values.

>>

 

So for two classes, min( v , c-1 ) = 1.

Hence, by default, only 1 canonical variable is generated !

 

Cheers,

Koen

DanObermiller
SAS Employee

From the looks of the plot, I believe you are using JMP. If that is the case, you may want to post your question in the JMP community: http://community.jmp.com 

sbxkoenk
SAS Super FREQ

Good point, @DanObermiller .

A shame I didn't notice that. 😞😤

 

@marelizgrav : please ask your question again in

https://community.jmp.com/t5/Discussions/bd-p/discussions

 

I can move topics within SAS Communities (from one board to another), but I do not think I can move topic threads from SAS Communities to JMP Communities or vice versa. @BeverlyBrown : Can I ?

 

Thanks,

Koen

Rick_SAS
SAS Super FREQ

Koen: No, the JMP group has its own community.

BeverlyBrown
Community Manager

What @Rick_SAS said. You can't get there from here... 😉

Couldn't attend SAS Innovate in person? We gotchu. Access on-demand content now!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 786 views
  • 4 likes
  • 5 in conversation