Colorizing contribution of variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Colorizing contribution of variables

Mahmood Naderan-Tahan
Hi

I use the following function to plot the variables with their contributions.


fviz_famd_var(res.famd, "quanti.var", col.var = "contrib",
              gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
              repel = TRUE)


The result can be seen at https://i.stack.imgur.com/Kbq1j.png

When I use "quanti.var$contrib" I see multiple dimensions and the question is which dimension is used for colorizing the contributions? For example, is the blue color of V2 related to low contribution on Dim1 or Dim2?


Regards,
Mahmood

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Colorizing contribution of variables

Sarah Goslee
Hi,

I am going to assume that you are using factoextra, and are working
the example from the function in question, but it would be useful for
you to explicitly state that when you're asking a question about a
particular package and function.

When you choose the argument "contrib" the colors are based on the
strength of the relationship overall (the length of the arrow), not
the contribution of any individual direction.

See here http://www.sthda.com/english/wiki/factoextra-r-package-easy-multivariate-data-analyses-and-elegant-visualization
and the various other sources of documentation for the packages.

Sarah

On Sun, Mar 21, 2021 at 1:32 PM Mahmood Naderan-Tahan
<[hidden email]> wrote:

>
> Hi
>
> I use the following function to plot the variables with their contributions.
>
>
> fviz_famd_var(res.famd, "quanti.var", col.var = "contrib",
>               gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
>               repel = TRUE)
>
>
> The result can be seen at https://i.stack.imgur.com/Kbq1j.png
>
> When I use "quanti.var$contrib" I see multiple dimensions and the question is which dimension is used for colorizing the contributions? For example, is the blue color of V2 related to low contribution on Dim1 or Dim2?
>
>
> Regards,
> Mahmood
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



--
Sarah Goslee (she/her)
http://www.numberwright.com

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Colorizing contribution of variables

Mahmood Naderan-Tahan
Yes I am using factoextra.


>When you choose the argument "contrib" the colors are based on the
>strength of the relationship overall (the length of the arrow), not
>the contribution of any individual direction.


Then, the question is why the legend is not in 0 to 1 scale?


Regards,
Mahmood

________________________________
From: Sarah Goslee <[hidden email]>
Sent: Sunday, March 21, 2021 8:26:55 PM
To: Mahmood Naderan-Tahan
Cc: [hidden email]
Subject: Re: [R] Colorizing contribution of variables

Hi,

I am going to assume that you are using factoextra, and are working
the example from the function in question, but it would be useful for
you to explicitly state that when you're asking a question about a
particular package and function.

When you choose the argument "contrib" the colors are based on the
strength of the relationship overall (the length of the arrow), not
the contribution of any individual direction.

See here http://www.sthda.com/english/wiki/factoextra-r-package-easy-multivariate-data-analyses-and-elegant-visualization
and the various other sources of documentation for the packages.

Sarah

On Sun, Mar 21, 2021 at 1:32 PM Mahmood Naderan-Tahan
<[hidden email]> wrote:

>
> Hi
>
> I use the following function to plot the variables with their contributions.
>
>
> fviz_famd_var(res.famd, "quanti.var", col.var = "contrib",
>               gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
>               repel = TRUE)
>
>
> The result can be seen at https://i.stack.imgur.com/Kbq1j.png
>
> When I use "quanti.var$contrib" I see multiple dimensions and the question is which dimension is used for colorizing the contributions? For example, is the blue color of V2 related to low contribution on Dim1 or Dim2?
>
>
> Regards,
> Mahmood
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



--
Sarah Goslee (she/her)
http://www.numberwright.com

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.