<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Tue, 14 Apr 2026 11:41:20 +0200 -->

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Documentation]]></title>
		<atom:link href="https://www.sthda.com/french/syndication/rss/wiki/13" rel="self" type="application/rss+xml"/>
		<link>https://www.sthda.com</link>
		<description><![CDATA[Derniers articles de la catégorie Analyse factorielle]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>fr</language>
		<generator>PHPBoost</generator>
		
		
		<item>
			<title><![CDATA[Analyse en composante principale avec R et RQuery]]></title>
			<link>https://www.sthda.com/french/wiki/analyse-en-composante-principale-avec-r-et-rquery</link>
			<guid>https://www.sthda.com/french/wiki/analyse-en-composante-principale-avec-r-et-rquery</guid>
			<description><![CDATA[Faire une analyse en composante principale peut s&#8217;av?rer parfois une tache tr?s fastidieuse. Les logiciels sont en g?n?ral tr?s chers et pas tr?s clairs. Les logiciels gratuits, notamment R, n?cessitent une maitrise de la programmation sous l'environnement statistique R.<br />
<br />
Le but de ce tutorat est de vous apprendre ? faire par vous m?me une analyse en composante principale sous R, en partant de ZERO CONNAISSANCE en programmation R.<br />
<br />
Gr?ce ? RQuery, vous allez ?tre des pro de l'ACP en  2 minutes!!<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-introduction-a-l-analyse-en-composante-principale">Introduction ? l'analyse en composante principale</h2><br />
<br /><br />
<img src="https://www.sthda.com/french/french/templates/base/images/success.png" alt="" /> Cliquez sur le lien suivant : <a href="https://www.sthda.com/french/french/wiki/introduction-a-l-analyse-en-composante-principale"> Introduction ? l'analyse en composante principale </a><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-pca-en-une-seule-ligne-de-commande">PCA en une seule ligne de commande</h2><br />
<br />
Si vous avez toujours r?v? de pouvoir faire une analyse en composante principale (ACP) avec R, RQuery vous simplifie compl?tement la vie.<br />
<br />
RQuery vous r?sume l'ACP en une seule ligne de commande dans R. Il s'agit de la fonction <strong>rquery.pca()</strong><br />
Taper simplement le code suivant dans R puis valider par la touche entr?e.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">res.<span style="">pca</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<span class="notice">R vous demandera d'indiquer le fichier contenant les donn?es. T?l?charger un exemple de fichier en cliquant   <a href="https://www.sthda.com/french/french/upload/decathlon_var_active.txt">ici</a> </span><br />
<br />
 <img src="https://www.sthda.com/french/french/templates/base/images/important.png" alt="" />Enregistrer le fichier au format .txt tabulation.<br />
<br />
Pour en savoir plus sur le format de fichier accept? suivre le lien suivant :<a href="https://www.sthda.com/french/french/wiki/importation-et-exportation-des-donnees-avec-rquery-1-0"> Importation et exportation des donn?es avec RQuery-1.0</a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-resultats">R?sultats</h2><br />
Un dossier "Result/ACPResult" est cr?? contenant les fichiers r?sultats.<br />
<br />
Les images suivantes sont automatiquement g?n?r?es par la fonction <strong>rquery.pca()</strong><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-valeurs-propres">Les valeurs propres</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/eig_pca.png"> <img src="https://www.sthda.com/french/french/upload/mini_eig_pca.png" alt="" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-graphique-des-individus">Graphique des individus</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/ind_pca.png"> <img src="https://www.sthda.com/french/french/upload/mini_ind_pca.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-graphique-des-variables">Graphique des variables</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/var_pca.png">  <img src="https://www.sthda.com/french/french/upload/mini_var_pca.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-representation-simultanee-des-individus-et-des-variables">Repr?sentation simultan?e des individus et des variables</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/biplot_acp.png"> <img src="https://www.sthda.com/french/french/upload/mini_biplot_acp.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-fichier-resultat-acp-txt">Fichier r?sultat (acp.txt)</h3><br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> La fonction<strong> rquery.pca()</strong> g?n?re ?galement un fichier .txt contenant l'ensemble des donn?es ayant servi ? faire les graphiques.<br />
<br />
Ce fichier txt vous permettra de refaire tous les graphes sur excel ? votre convenance. Le graphique ci-dessous montre un exemple du plan des individus retravaill? sur excel.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/ind_acp_excel_plot.png"> <img src="https://www.sthda.com/french/french/upload/mini_ind_acp_excel_plot.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> T?l?charger un exemple du fichier g?n?r? en cliquant sur le lien suivant:  <a href="https://www.sthda.com/french/french/upload/pca_result3614.txt">pca_result3614.txt</a><br />
<strong><br />
Le fichier contient:</strong><br />
<strong>eig:</strong> correspondant aux valeurs propres, le % de variance et le % de variance cumul?e<br />
<strong> var</strong>: Contient les r?sultats pour les variables actives (coordonn?es, corr?lation entre les variables et les axes, COS2, contributions);<br />
<strong>ind :</strong> Contient les r?sultats pour les individus actifs (coordonn?es COS2, contributions);<br />
<strong>ind.sup </strong>: Contient les r?sultats pour les individus suppl?mentaires (coordonn?es COS2);<br />
<strong>quanti.sup</strong> : R?sultats pour les variables suppl?mentaires quantitatives (coordonn?es, corr?lation entre les variables et les axes).<br />
<strong>quali.sup</strong> : R?sultats pour les variables qualitatives suppl?mentaires (coordonn?es, des cat?gories de chacun des variables ).<br />
<br />
<span class="notice"><br />
Un autre fichier contenant la description des diff?rents axes (acp_dimdesc.txt) est ?galement g?n?r? et ouvert automatiquement.<br />
<br />
T?l?charger un exemple en cliquant sur le lien suivant: <a href="https://www.sthda.com/french/french/upload/acp_dimdesc.txt">acp_dimdesc.txt</a><br />
Ce fichier permet de voir les variables quantitatives et qualitatives les plus li?es aux axes.<br />
<br />
</span><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-generer-un-fichier-pdf-contenant-les-graphiques">G?n?rer un fichier PDF contenant les graphiques</h2><br />
<br />
Au lieu d'afficher les graphiques,  le code ci-dessous les enregistre tous dans un fichier pdf.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">res.<span style="">pca</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE<span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le fichier PDF est automatiquement ouverte ? la fin de l'ex?cution de la commande.<br />
<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /><a href="https://www.sthda.com/french/french/upload/pca_result4050.pdf">Cliquer ici</a> pour voir un exemple de fichier pdf g?n?r?.<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-cas-des-individus-et-variables-supplementaires">Cas des individus et variables suppl?mentaires</h2><br />
<br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-individus-supplementaires">Les individus suppl?mentaires</h3><br />
<br />
Ce  sont des individus qui ne  participeront pas ? la construction des axes de l'analyse en composante principale. Les individus participant ? l'ACP sont appel?s, par opposition, individus actifs.<br />
La position des individus suppl?mentaires sera donc pr?dite gr?ce ? l'ACP r?alis?e uniquement avec les individus actifs.<br />
Cette approche pourrait ?tre utilis?e lorsque l'on souhaite faire de la pr?diction avec l'ACP.<br />
<br />
Les individus suppl?mentaires peuvent ?galement  ?tre des individus dont les r?sultats sont peu fiables et contenant des valeurs manquantes.<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-variables-supplementaires-ou-illustratifs">Les variables suppl?mentaires ou illustratifs</h3><br />
<br /><br />
On peut mettre des variables ? expliquer en suppl?mentaire. Par opposition les variables explicatives seront utilis?es pour faire l'ACP. La variable ? expliquer est introduite ? la fin de l'analyse afin de la positionner sur le plan principal. D'autres variables peuvent manquer de fiabilit?. On peut h?siter ? les introduire dans l'analyse. Elles peuvent ?tre utilis?es comme variables suppl?mentaires. Les variables suppl?mentaires peuvent ?tre soient <strong>qualitatives</strong> soit <strong>quantitatives </strong><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-acp-avec-des-individus-et-variables-supplementaires">ACP avec des individus et variables suppl?mentaires</h3><br />
<br /><br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> 1)  T?l?charger et enregistrer  ce fichier au *.txt tabulation  :  <a href="https://www.sthda.com/french/french/upload/pca_auto.txt">pca_auto.txt</a><br />
<br />
L'image du fichier est montr?e ci-dessous. Cliquez dessus pour agrandir.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/pca_auto.png"> <img src="https://www.sthda.com/french/french/upload/mini_pca_auto.png" alt="" /> </a><br />
<span style="font-size: 12px;">Cliquez pour agrandir</span><br />
<br />
Ce fichier contient des mod?les de voitures d?crites par plusieurs variables, notamment la vitesse maximale, la largeur, la longueur, etc, ...<br />
<br />
<strong>Il contient  9 colonnes et 20 lignes</strong>. Les lignes <strong>19 (Peugeot 604) et 20 (Peugeot 304S)</strong> correspondent ? des '<strong>individus suppl?mentaires</strong>' (abr?viation : <strong><span style="color:#FF9900;">ind.sup=19:20</span></strong>). La colonne 8 (R-Poids.PUIS) correspond ? une variable <strong>quantitative illustrative</strong> ou suppl?mentaire (abr?viation : <strong><span style="color:#FF9900;">quanti.sup=8</span></strong>) et la colonne 9 (FINITION) correspond ? une variable <strong>qualitative suppl?mentaire</strong> (abr?viation :<strong><span style="color:#FF9900;"> quali.sup=9</span></strong>)<br />
<br />
Maintenant, nous allons faire appel ? la fonction rquery.pca() en lui donnant toutes ces informations.<br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> 2) Code R<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span>ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">19</span><span style="color: #080;">:</span><span style="color: #ff0000;">20</span>, quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">9</span>, quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">8</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<br />
<p style="text-align: center;"><br />
<table class="formatter-table">
    <tr class="formatter-table-row">
        <th class="formatter-table-head">Plan factoriel des variables</th>
        <th class="formatter-table-head">Plan factoriel des individus</th>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col"> <a href="https://www.sthda.com/french/french/upload/auto_pca_var.png"><img src="https://www.sthda.com/french/french/upload/mini_auto_pca_var.png" alt="" /></a>    </td>
        <td class="formatter-table-col"> <a href="https://www.sthda.com/french/french/upload/auto_pca_ind.png"><img src="https://www.sthda.com/french/french/upload/mini_auto_pca_ind.png" alt="" /> </a>  </td>
    </tr>
</table><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
</p><br />
<br />
Sur le plan des variables, les variables suppl?mentaires quantitatives sont indiqu?es en bleu.<br />
Sur le plan factoriel des individus, les individus suppl?mentaires sont indiqu?s en bleu et les variables qualitatives suppl?mentaires sont montr?es en rose.<br />
<br />
Nous allons maintenant colorer les individus en fonction de leur groupe , c'est ? dire en fonction de la variable qualitative  FINITION ou  la colonne 9.<br />
<br />
Il suffit juste de l'indiquer ? la fonction <strong>rquery.pca()</strong> gr?ce au param?tre <strong>'habillage'</strong> (voir le code ci-dessous)<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span>ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">19</span><span style="color: #080;">:</span><span style="color: #ff0000;">20</span>, quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">9</span>, quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">8</span>, habillage <span style="color: #080;">=</span> <span style="color: #ff0000;">9</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
On pourrait m?me ajouter des ellipses pour chaque groupe.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span>ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">19</span><span style="color: #080;">:</span><span style="color: #ff0000;">20</span>, quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">9</span>, quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">8</span>, habillage <span style="color: #080;">=</span> <span style="color: #ff0000;">9</span>, ellipse<span style="color: #080;">=</span> TRUE<span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Voici le r?sultat :<br />
<br />
<a href="https://www.sthda.com/french/french/upload/auto_pca_ind_ellipse.png"> <img src="https://www.sthda.com/french/french/upload/mini_auto_pca_ind_ellipse.png" alt="" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-acp-3d">ACP 3d</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span>ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">19</span><span style="color: #080;">:</span><span style="color: #ff0000;">20</span>, quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">9</span>, quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">8</span>, choix<span style="color: #080;">=</span><span style="color: #ff0000;">"3d"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<br />
<a href="https://www.sthda.com/french/french/upload/acp_3d.png"><img src="https://www.sthda.com/french/french/upload/mini_acp_3d.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utilisateur-avance">Utilisateur avanc?</h2><br />
<br />
cliquer sur le lien suivant <a href="https://www.sthda.com/french/french/wiki/rquery-pca">rquery.pca</a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-conclusions">Conclusions</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">&nbsp;
<span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#Fait une ACP et affiche les graphiques</span>
<span style="color: #0000FF; font-weight: bold;">rquery.<span style="">pca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#Fait une ACP et enregistre les graphiques</span>
&nbsp;</pre></pre></div>]]></description>
			<pubDate>Mon, 02 Mar 2015 00:04:35 +0100</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Analyse factorielle des correspondances multiples]]></title>
			<link>https://www.sthda.com/french/wiki/analyse-factorielle-des-correspondances-multiples</link>
			<guid>https://www.sthda.com/french/wiki/analyse-factorielle-des-correspondances-multiples</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-introduction-a-l-analyse-factorielle-des-correspondances-multiples-acm">Introduction ? l'analyse factorielle des correspondances multiples (ACM)</h2><br />
<br />
L'ACM est utilis?e dans le cas o? on a plusieurs variables nominales (ou qualitatives) d?crivant les individus.<br />
<br />
Dans l'exemple ci-dessous, l' ?tude est effectu?e sur des enfants soufrant d'un empoisonnement alimentaire. On leur demande les sympt?mes (Nausea, Vomiting, Abdominals, Fever,Diarrhae)  et a propos de  ce qu'ils ont mang? (Potato, Fish, Mayo, Courgette, Cheese, Icecream).<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-acm-en-une-seule-ligne-de-commande">ACM en une seule ligne de commande</h2><br />
<br /><br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">res.<span style="">mca</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<span class="notice">R vous demandera d'indiquer le fichier contenant les donn?es. T?l?charger un exemple de fichier en cliquant <a href="https://www.sthda.com/french/french/upload/acm_file_format_actif.txt">ici</a> </span><br />
<br />
<br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/important.png" alt="" />Enregistrer le fichier au format .txt tabulation.<br />
<br />
Pour en savoir plus sur le format de fichier accept? suivre le lien suivant :<a href="https://www.sthda.com/french/french/wiki/importation-et-exportation-des-donnees-avec-rquery-1-0"> Importation et exportation des donn?es avec RQuery-1.0</a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-resultats">R?sultats</h2><br />
<br />
Un dossier "Result/ACMResult" est cr?? contenant les fichiers r?sultats.<br />
<br />
Les images suivantes sont automatiquement g?n?r?es par la fonction <strong>rquery.mca()</strong><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-valeurs-propres">Les valeurs propres</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/eig_mca.png"> <img src="https://www.sthda.com/french/french/upload/mini_eig_mca.png" alt="" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-graphique-des-individus">Graphique des individus</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/ind_mca.png"> <img src="https://www.sthda.com/french/french/upload/mini_ind_mca.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-graphique-des-variables">Graphique des variables</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/var_mca.png">  <img src="https://www.sthda.com/french/french/upload/mini_var_mca.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-representation-simultanee-des-individus-et-des-variables">Repr?sentation simultan?e des individus et des variables</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/biplot_mca.png"> <img src="https://www.sthda.com/french/french/upload/mini_biplot_mca.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-fichier-resultat-acm-txt">Fichier r?sultat (acm.txt)</h3><br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> La fonction<strong> rquery.mca()</strong> g?n?re ?galement un fichier .txt contenant l'ensemble des donn?es ayant servi ? faire les graphiques.<br />
<br />
Ce fichier txt vous permettra de refaire tous les graphes sur excel ? votre convenance. Le graphique ci-dessous montre un exemple du plan des individus retravaill? sur excel.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/ind_excel_mca.png"> <img src="https://www.sthda.com/french/french/upload/mini_ind_excel_mca.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> T?l?charger un exemple du fichier g?n?r? en cliquant sur le lien suivant:   <a href="https://www.sthda.com/french/french/upload/acm_result.txt">acm_result.txt</a><br />
<strong><br />
Le fichier contient:</strong><br />
<strong>eig:</strong> correspondant aux valeurs propres, le % de variance et le % de variance cumul?e<br />
<strong> var</strong>: Contient les r?sultats pour les variables actives (coordonn?es, corr?lation entre les variables et les axes, COS2, contributions);<br />
<strong>ind :</strong> Contient les r?sultats pour les individus actifs (coordonn?es COS2, contributions);<br />
<strong>ind.sup </strong>: Contient les r?sultats pour les individus suppl?mentaires (coordonn?es COS2);<br />
<strong>quanti.sup</strong> : R?sultats pour les variables suppl?mentaires quantitatives (coordonn?es, corr?lation entre les variables et les axes).<br />
<strong>quali.sup</strong> : R?sultats pour les variables qualitatives suppl?mentaires (coordonn?es, des cat?gories de chacun des variables ).<br />
<br />
<span class="notice"><br />
Un autre fichier contenant la description des diff?rents axes (acm_dimdesc.txt) est ?galement g?n?r? et ouvert automatiquement.<br />
<br />
T?l?charger un exemple en cliquant sur le lien suivant:  <a href="https://www.sthda.com/french/french/upload/acm_dimdesc.txt">acm_dimdesc.txt</a><br />
Ce fichier permet de voir les variables quantitatives et qualitatives les plus li?es aux axes.<br />
<br />
</span><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-acm-3d">ACM 3d</h2><br />
<br />
Pour illustrer le plan des individus en 3 dimensions, taper la commande suivante.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>choix<span style="color: #080;">=</span><span style="color: #ff0000;">"3d"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le r?sultat obtenu est une image dynamique que l'on peut agrandir, zoomer et mettre en rotation.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/acm_3d.png"><img src="https://www.sthda.com/french/french/upload/mini_acm_3d.png" alt="" /></a><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-generer-un-fichier-pdf-contenant-les-graphiques">G?n?rer un fichier PDF contenant les graphiques</h2><br />
<br />
Au lieu d'afficher les graphiques,  le code ci-dessous les enregistre tous dans un fichier pdf.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE<span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le fichier PDF est automatiquement ouverte ? la fin de l'ex?cution de la commande.<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /><a href="https://www.sthda.com/french/french/upload/mca_result3729.pdf">Cliquer ici</a> pour voir un exemple de fichier pdf g?n?r?.<br />
<br />
<span class="notice">Pour ?viter l'affichage des r?sultats txt ? chaque fois que vous ex?cuter la fonction rquery.mca(), ajouter le param?tre show.txt=FALSE (voir exemple ci-dessous)<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE, show.<span style="">txt</span><span style="color: #080;">=</span>FALSE<span style="color: #080;">&#41;</span><span style="color: #228B22;">#Dans ce cas le pdf est affich? mais sans les r?sultats .txt</span></pre></pre></div></span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-coloration-des-individus-en-fonction-des-variables-qualitatives">Coloration des individus en fonction des variables qualitatives</h2><br />
<br /><br />
<span class="notice">L'ACM utilise des variables qualitatives. Chacune des variables qualitatives peuvent ?tre utilis?es pour colorer les individus.<br />
Il suffit juste de fournir le param?tre <strong>habillage</strong> ? la fonction. le param?tre habillage correspond au num?ro de la colonne de la variable d'int?r?t. Dans notre cas, si l'on veut colorer les individus en fonction de la variable 'Nausea' (colonne 1), il faudrait ?crire habillage = 1.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>habillage<span style="color: #080;">=</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
</span><br />
<br />
Pour ajouter une ellipse:<br />
<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>habillage<span style="color: #080;">=</span><span style="color: #ff0000;">1</span>, ellipse<span style="color: #080;">=</span>TRUE, typeEllipse<span style="color: #080;">=</span><span style="color: #ff0000;">"Ade4"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-cas-des-individus-et-variables-supplementaires">Cas des individus et variables suppl?mentaires</h2><br />
<br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-individus-supplementaires">Les individus suppl?mentaires</h3><br />
<br />
Ce  sont des individus qui ne  participeront pas ? la construction des axes de l'analyse ACM. Les individus participant ? l'ACM sont appel?s, par opposition, individus actifs.<br />
La position des individus suppl?mentaires sera donc pr?dite gr?ce ? l'ACM r?alis?e uniquement avec les individus actifs.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-variables-supplementaires-ou-illustratifs">Les variables suppl?mentaires ou illustratifs</h3><br />
<br />
On peut mettre des variables ? expliquer en suppl?mentaire. Par opposition les variables explicatives seront utilis?es pour faire l'ACM. La variable ? expliquer est introduite ? la fin de l'analyse afin de la positionner sur le plan principal. D'autres variables peuvent manquer de fiabilit?. On peut h?siter ? les introduire dans l'analyse. Elles peuvent ?tre utilis?es comme variables suppl?mentaires. Les variables suppl?mentaires peuvent ?tre soient <strong>qualitatives</strong> soit <strong>quantitatives </strong><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-acm-avec-des-individus-et-variables-supplementaires">ACM avec des individus et variables suppl?mentaires</h3><br />
<br /><br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> 1)  T?l?charger et enregistrer  ce fichier au *.txt tabulation  :<br />
<a href="https://www.sthda.com/french/french/upload/acm_file_format.txt">acm_file_format.txt</a><br />
<br />
 Une image d'une partie du fichier est montr?e ci-dessous.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/acm_format.png"><img src="https://www.sthda.com/french/french/upload/mini_acm_format.png" alt="" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
Le fichier contient 15 colonnes et les individus sont num?rot?s de 1 ? 55. Ce fichier est une modification du premier que vous avez t?l?charg?.<br />
<br />
L'age (colonne 1) et le temps (colonne 2) correspondent ? des <strong>variables quantitatives suppl?mentaires</strong> (abr?viation <strong><span style="color:#FF9900;">quanti.sup=c(1,2)</span></strong>).<br />
<br />
Sick(colonne 3) et Sex(colonne 4) correspondent ? des <strong>variables quanlitatives suppl?mentaires</strong> (abr?viation <strong><span style="color:#FF9900;">quali.sup=c(3,4)</span></strong>).<br />
<br />
Pour finir, nous allons mettre les individus en lignes 10, 13 et 16 en individus suppl?mentaires (abr?viation <strong><span style="color:#FF9900;">ind.sup=c(10,13, 16)</span></strong>).<br />
<br />
Maintenant, nous allons faire appel ? la fonction rquery.mca() en lui donnant toutes ces informations et au lieu d'afficher les graphiques, je sauvegarde en pdf en utilisant le param?tre <strong>save.pdf</strong>.<br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> 2) Code R<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span>,quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">3</span>,<span style="color: #ff0000;">4</span><span style="color: #080;">&#41;</span>, ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">10</span>,<span style="color: #ff0000;">13</span>, <span style="color: #ff0000;">16</span><span style="color: #080;">&#41;</span>, save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE<span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" /> 3)  T?l?charger le r?sultat pdf en cliquant sur le lien suivant  :<br />
 <a href="https://www.sthda.com/french/french/upload/mca_result_ind_var_sup2854.pdf">mca_result_ind_var_sup2854.pdf</a><br />
<br />
Le fichier pdf contient:<br />
<ol class="formatter-ol">
    <li class="formatter-li">Le graphique des valeurs propres
    </li><li class="formatter-li">Le plan factoriel des individus (en bleu) et es individus suppl?mentaires(en bleu fonc?)
    </li><li class="formatter-li">Le plan factoriel des individus color?s en fonction des variables qualitatives (ici : sick et sex)
    </li><li class="formatter-li">Le plan factoriel des variables (en rouge) et les variables qualitatives suppl?mentaires(en vert)
    </li><li class="formatter-li">Le plan factoriel des variables quantitatives suppl?mentaires (age et time)
        </li><li class="formatter-li">Enfin, le graphique superpos? des individus et des variables.<br />
</li></ol><br />
<br />
La coloration des individus en fonction d'une variable qualitative se fait en utilisant le param?tre  <strong>'habillage'</strong><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span>,quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">3</span>,<span style="color: #ff0000;">4</span><span style="color: #080;">&#41;</span>, ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">10</span>,<span style="color: #ff0000;">13</span>, <span style="color: #ff0000;">16</span><span style="color: #080;">&#41;</span>, habillage<span style="color: #080;">=</span><span style="color: #ff0000;">3</span><span style="color: #080;">&#41;</span>
<span style="color: #228B22;">#habillage correspond au num?ro de colonne de la variable qualitative d'int?r?t.</span>
&nbsp;</pre></pre></div><br />
<br />
On pourrait m?me ajouter des ellipses pour chaque groupe.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>quanti.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span>,quali.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">3</span>,<span style="color: #ff0000;">4</span><span style="color: #080;">&#41;</span>, ind.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">10</span>,<span style="color: #ff0000;">13</span>, <span style="color: #ff0000;">16</span><span style="color: #080;">&#41;</span>, habillage<span style="color: #080;">=</span><span style="color: #ff0000;">3</span>, ellipse<span style="color: #080;">=</span>TRUE, typeEllipse<span style="color: #080;">=</span><span style="color: #ff0000;">"Ade4"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Voici le r?sultat :<br />
<br />
<a href="https://www.sthda.com/french/french/upload/mca_ellipse.png"><img src="https://www.sthda.com/french/french/upload/mini_mca_ellipse.png" alt="" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utilisateur-avance">Utilisateur avanc?</h2><br />
<br />
cliquer sur le lien suivant <a href="https://www.sthda.com/french/french/wiki/rquery-mca">rquery.mca</a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-conclusions">Conclusions</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">&nbsp;
<span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#Fait une ACM et affiche les graphiques</span>
<span style="color: #0000FF; font-weight: bold;">rquery.<span style="">mca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#Fait une mca et enregistre les graphiques</span>
&nbsp;</pre></pre></div>]]></description>
			<pubDate>Mon, 22 Dec 2014 23:41:46 +0100</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Analyse factorielle]]></title>
			<link>https://www.sthda.com/french/wiki/analyse-factorielle</link>
			<guid>https://www.sthda.com/french/wiki/analyse-factorielle</guid>
			<description><![CDATA[Cat?gorie contenant des cours sur l'analyse factorielle (ACP, AFC, ACM)]]></description>
			<pubDate>Sat, 06 Aug 2011 15:27:06 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Analyse factorielle des correspondances simple]]></title>
			<link>https://www.sthda.com/french/wiki/analyse-factorielle-des-correspondances-simple</link>
			<guid>https://www.sthda.com/french/wiki/analyse-factorielle-des-correspondances-simple</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-introduction-a-l-analyse-factorielle-des-correspondances-simple-afc">Introduction ? l'analyse factorielle des correspondances simple (AFC)</h2><br />
<br />
L'AFC est une repr?sentation graphique des modalit?s de deux variables nominales (ou variables qualitatives). C'est une m?thode d'analyse de tableaux de contingence. Un tableau de contingence est un tableau dans lequel on situe un effectif selon deux crit?res (un en ligne et un en colonne). L'AFC est tr?s semblable ? l'analyse en composante principale. Les modalit?s sont repr?sent?es dans le plan par par des points. Le graphique permet de voir une attraction ou une r?pulsion entre modalit?s.<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-format-du-tableau-de-donnees">Format du tableau de donn?es</h2><br />
<br />
Une image du format du jeu de donn?es est montr?e ci-dessous:<br />
<br />
 <img src="https://www.sthda.com/french/french/upload/afc_format_tache_menagere.png" alt="" class="valign_" /><br />
<br />
Dans cet exemple on se pose la question ? savoir la r?partition des taches quotidiennes, au sein d'une famille, entre une femme et son ?poux. Les lignes du tableau correspondent aux diff?rentes taches. Pour une tache donn?e, la valeur indiqu?e repr?sente la fr?quence d'ex?cution par l'?pouse seule (<strong>wife</strong>), de mani?re altern?e entre les 2 (<strong>alternating</strong>), par l'?poux seul (<strong>Husband)</strong> et par les 2 en m?me temps (<strong>jointly</strong>).<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-afc-en-une-seule-ligne-de-commande">AFC en une seule ligne de commande</h2><br />
<br /><br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">res.<span style="">ca</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
R vous demandera d'indiquer le fichier contenant les donn?es. T?l?charger un exemple de fichier en cliquant  <a href="https://www.sthda.com/french/french/upload/afc_tache_menageres.txt">ici</a><br />
<br />
<br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/important.png" alt="" class="valign_" />Enregistrer le fichier au format .txt tabulation.<br />
<br />
Pour en savoir plus sur le format de fichier accept? suivre le lien suivant :<a href="https://www.sthda.com/french/french/wiki/importation-et-exportation-des-donnees-avec-rquery-1-0"> Importation et exportation des donn?es avec RQuery-1.0</a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-resultats">R?sultats</h2><br />
<br />
Un dossier "Result/CAResult" est cr?? contenant les fichiers r?sultats.<br />
<br />
Les images suivantes sont automatiquement g?n?r?es par la fonction <strong>rquery.ca()</strong><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-valeurs-propres">Les valeurs propres</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/eig_ca.png"> <img src="https://www.sthda.com/french/french/upload/mini_eig_ca.png" alt="" class="valign_" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-plan-factoriel">Plan factoriel</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/plan_facto_ca.png"> <img src="https://www.sthda.com/french/french/upload/mini_plan_facto_ca.png" alt="" class="valign_" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<span class="notice">Pour voir uniquement le plan des lignes<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">invisible</span><span style="color: #080;">=</span><span style="color: #ff0000;">"col"</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#on cache les colonnes</span></pre></pre></div><br />
<br />
Pour voir uniquement le plan des colonnes<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">invisible</span><span style="color: #080;">=</span><span style="color: #ff0000;">"row"</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#on cache les lignes</span></pre></pre></div><br />
</span><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-fichier-resultat-ca-txt">Fichier r?sultat (ca.txt)</h3><br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /> La fonction<strong> rquery.ca()</strong> g?n?re ?galement un fichier .txt contenant l'ensemble des donn?es ayant servi ? faire les graphiques.<br />
<br />
Ce fichier txt vous permettra de refaire tous les graphes sur excel ? votre convenance.<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /> T?l?charger un exemple du fichier g?n?r? en cliquant sur le lien suivant:   <a href="https://www.sthda.com/french/french/upload/ca_result.txt">ca_result.txt</a><br />
<strong><br />
Le fichier contient:</strong><br />
<strong>eig:</strong> correspondant aux valeurs propres, le % de variance et le % de variance cumul?e<br />
<strong> col</strong>: Contient les r?sultats pour les colonnes (coordonn?es, corr?lation entre les variables et les axes, COS2, contributions);<br />
<strong>row</strong>:Contient les r?sultats pour les lignes (coordonn?es, corr?lation entre les variables et les axes, COS2, contributions);<br />
<strong>col.sup </strong>: Contient les r?sultats pour les colonnes suppl?mentaires (coordonn?es, COS2);<br />
<strong>row.sup</strong> : R?sultats pour les lignes suppl?mentaires (coordonn?es, COS2).<br />
<br />
<span class="notice"><br />
Un autre fichier contenant la description des diff?rents axes (ca_dimdesc.txt) est ?galement g?n?r? et ouvert automatiquement.<br />
<br />
T?l?charger un exemple en cliquant sur le lien suivant:  <a href="https://www.sthda.com/french/french/upload/ca_dimdesc.txt">ca_dimdesc.txt</a><br />
Ce fichier permet de voir les variables les plus li?es aux axes.<br />
<br />
</span><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-afc-3d">AFC 3d</h2><br />
<br />
Pour illustrer le plan factoriel en 3 dimensions, taper la commande suivante.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span>choix<span style="color: #080;">=</span><span style="color: #ff0000;">"3d"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le r?sultat obtenu est une image dynamique que l'on peut agrandir, zoomer et mettre en rotation.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/plan_facto3d_ca.png"><img src="https://www.sthda.com/french/french/upload/mini_plan_facto3d_ca.png" alt="" class="valign_" /></a><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-generer-un-fichier-pdf-contenant-les-graphiques">G?n?rer un fichier PDF contenant les graphiques</h2><br />
<br />
Au lieu d'afficher les graphiques,  le code ci-dessous les enregistre tous dans un fichier pdf.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE<span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le fichier PDF est automatiquement ouverte ? la fin de l'ex?cution de la commande.<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /><a href="https://www.sthda.com/french/french/upload/ca_result2209.pdf">Cliquer ici</a> pour voir un exemple de fichier pdf g?n?r?.<br />
<br />
<span class="notice">Pour ?viter l'affichage des r?sultats txt ? chaque fois que vous ex?cuter la fonction rquery.ca(), ajouter le param?tre show.txt=FALSE (voir exemple ci-dessous)<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE, show.<span style="">txt</span><span style="color: #080;">=</span>FALSE<span style="color: #080;">&#41;</span><span style="color: #228B22;">#Dans ce cas le pdf est affich? mais sans les r?sultats .txt</span></pre></pre></div></span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-cas-des-lignes-et-colonnes-supplementaires">Cas des lignes et colonnes suppl?mentaires</h2><br />
<br />
Les lignes et les colonnes suppl?mentaires correspondent ? des modalit?s qui ne participeront ? l'AFC mais dont les positions seront pr?dites gr?ce ? l'AFC r?alis?e uniquement avec les modalit?s actives.<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-afc-avec-des-lignes-et-colonnes-supplementaires">AFC avec des lignes et colonnes suppl?mentaires</h3><br />
<br /><br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /> 1)  T?l?charger et enregistrer  ce fichier au *.txt tabulation  : <a href="https://www.sthda.com/french/french/upload/afc-children.txt">afc-children.txt</a><br />
<br />
Une image d'une partie du fichier est montr?e ci-dessous.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/afc_children.png"><img src="https://www.sthda.com/french/french/upload/mini_afc_children.png" alt="" class="valign_" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
Ce tableau correspond ? un tableau de contingence r?sumant les r?ponses donn?es par diff?rentes cat?gories de personne ? la question suivante : quelles sont selon vous les raisons qui font h?siter une femme ou un couple ? avoir des enfants?<br />
<br />
Les lignes et les colonnes color?s seront consid?r?es dans l'AFC comme des lignes et des colonnes suppl?mentaires ? cause des valeurs manquantes. L'AFC est tout d'abord r?alis?e sur le reste du tableau (colonnes et lignes actives non color?es) puis les coordonn?es des lignes et des colonnes suppl?mentaires sont calcul?es sur la base de l'AFC pr?c?dente.<br />
<br />
Le fichier contient 8 colonnes et 18 lignes.<br />
Les colonnes<strong> thirty</strong>, <strong>fifty</strong>, <strong>more_fifty</strong> correspondant respectivement aux colonnes num?ro 6, 7, 8 sont des <strong>colonnes suppl?mentaires </strong>  (abr?viation <strong><span style="color:#FF9900;">col.sup=c(6,7,8)</span></strong>).<br />
<br />
Les lignes 'comfort', 'disagreement', 'world' et  'to_live' correspondant respectivement aux lignes num?ro 15, 16, 17 et 18 sont des lignes suppl?mentaires  (abr?viation <strong><span style="color:#FF9900;">row.sup=c(15,16,17,18)</span></strong>)<br />
<br />
<span class="notice">Pour simplifier, on peut aussi ?crire row.sup=15:18; les deux points signifient 'tous les entiers de 15 ? 18 bornes comprises'</span><br />
<br />
<br />
Maintenant, nous allons faire appel ? la fonction rquery.ca() en lui donnant toutes ces informations et au lieu d'afficher les graphiques, je sauvegarde en pdf en utilisant le param?tre <strong>save.pdf</strong>.<br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /> 2) Code R<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span>col.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">6</span><span style="color: #080;">:</span><span style="color: #ff0000;">8</span>, row.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">15</span><span style="color: #080;">:</span><span style="color: #ff0000;">18</span>, save.<span style="">pdf</span><span style="color: #080;">=</span>TRUE<span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
 <img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /> 3)  T?l?charger le r?sultat pdf en cliquant sur le lien suivant  :<br />
 <a href="https://www.sthda.com/french/french/upload/ca_result_sup.pdf">ca_result_sup.pdf</a><br />
<br />
Le fichier pdf contient:<br />
<ol class="formatter-ol">
    <li class="formatter-li">Le graphique des valeurs propres
    </li><li class="formatter-li">Le plan factoriel des lignes (en bleu), des lignes suppl?mentaires (en bleu fonc?), des colonnes (en rouge) et des colonnes suppl?mentaires (en rouge fonc?).<br />
   <br />
</li></ol><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utilisateur-avance">Utilisateur avanc?</h2><br />
<br />
cliquer sur le lien suivant <a href="https://www.sthda.com/french/french/wiki/rquery-ca">rquery.ca</a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-conclusions">Conclusions</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">&nbsp;
<span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#Fait une AFC et affiche les graphiques</span>
<span style="color: #0000FF; font-weight: bold;">rquery.<span style="">ca</span></span><span style="color: #080;">&#40;</span>save.<span style="">pdf</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#Fait une AFC et enregistre les graphiques</span>
&nbsp;</pre></pre></div>]]></description>
			<pubDate>Fri, 05 Aug 2011 10:43:30 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Introduction à l'analyse en composante principale]]></title>
			<link>https://www.sthda.com/french/wiki/introduction-a-l-analyse-en-composante-principale</link>
			<guid>https://www.sthda.com/french/wiki/introduction-a-l-analyse-en-composante-principale</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-principe-de-l-acp">Principe de l'ACP</h2><br />
<br /><br />
L'ACP permet de synth?tiser l'information contenue dans un tableau de donn?es (n colonnes * p lignes). Elle permet d'identifier une ?ventuelle similarit? entre les individus et de d?terminer la liaison entre les variables.<br />
<br />
Les donn?es sont tout d'abord centr?es et r?duites c'est ? dire que chaque variable a une moyenne =0 et un ?cart type = 1.<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-notion-de-composante-principale-et-de-valeurs-propres-pourcentage-d-inertie">Notion de composante principale et de valeurs propres (= pourcentage d'inertie)</h2><br />
<br />
Lorsque l'on a un tableau contenant n variables, ceci correspond ? n axes (n dimensions) sous lesquels il faut repr?senter les individus. Le principe de l'ACP consiste ? projeter les donn?es dans un espace de dimensions inf?rieures permettant une analyse facile des donn?es. Il faut donc remplacer les n anciens axes par de nouveaux axes. Ces nouveaux axes (Ck) sont appel?s composantes principales et s'expriment comme une combinaison linaire des anciens axes (anciennes variables).<br />
<br />
Ck = ak1x1 +ak2x2 .......+ akmxm<br />
<br />
- Les coefficients de ces combinaisons lin?aires sont fournis par le logiciel; c'est eux qui d?finissent les<br />
nouveaux axes :<br />
<br />
    * ils permettent de calculer les nouvelles coordonn?es d'un point-individu ? partir des anciennes<br />
    * ils permettent ?galement de voir le poids d'une ancienne variable dans la d?finition d'un facteur. Le rep?rage des variables d'origine correspondant aux coefficients les plus ?lev?s en valeur absolu permet de d?gager une interpr?tation des facteurs.<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-choix-des-composantes-principales">Choix des composantes principales</h3><br />
<br />
<strong>Le premier axe principal</strong> est l'axe suivant lequel on a la plus grande dispersion du nuage de points (le plus grand allongement du nuage de points), permettant de distinguer au mieux les points. On dit en terme statistique, que c'est l'axe qui a la plus grande variance ou pourcentage d'inertie. La variance ou l'inertie d'un axe principal est encore appel?e valeur propre.<br />
<br />
<strong>Le 2?me axe principal</strong>, est la 2e direction d'allongement du nuage. C'est celui qui a la plus grande inertie r?siduelle apr?s la premi?re composante. Ainsi de suite jusqu'? remplacer les n axes anciens par m axes nouveaux.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-pourcentage-d-inertie-valeurs-propres-ou-variances-associees-aux-axes">Pourcentage d'inertie : valeurs propres ou variances associ?es aux axes</h3><br />
<br />
Le pourcentage d'inertie ou de dispersion repr?sente la quantit? d'information recueillie par un axe principal.<br />
<br />
L'analyse ACP es pertinent lorsqu'on arrive avec un petit nombre d'axes ? synth?tiser le maximum de l'information (80% de l'information par exemple). En g?n?ral on poursuit l'analyse si on arrive avec 3 ou 4 axes ? conserver le maximum de l'information.<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" />Le graphique ci-dessous montre qu'avec les 3 premiers axes, on a 64% de l'information.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/eig_pca.png"> <img src="https://www.sthda.com/french/french/upload/mini_eig_pca.png" alt="" class="valign_" /> </a><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-plan-des-variables">Plan des variables</h2><br />
<br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-le-cercle-de-correlation">Le cercle de corr?lation</h3><br />
<br />
Les variables sont projet?es dans un cercle de rayon 1 appel? cercle des corr?lations. Lorsqu'une variable est proche du bord du cercle, on dit qu'il est bien repr?sent? par le plan factoriel. Cette variable est alors bien corr?l?e avec les 2 facteurs principaux constituant ce plan.<br />
<br />
Le cercle permet de voir la corr?lation ou la liaison entre les variables.<br />
<br />
La corr?lation entre 2 points variables est ?gale au cosinus de l'angle entre les 2 variables. Plus cet angle est petit plus la corr?lation est forte.<br />
<br />
- Si l'angle = 90? => Cos = 0 => pas de corr?lation<br />
- Si l'angle = 180? => Cos = -1 => Corr?lation inverse forte entre les 2 variables.<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" />Le graphique ci-dessous montre une tr?s forte corr?lation entre les variables Discus et Shot.put<br />
<br />
<br />
<a href="https://www.sthda.com/french/french/upload/var_pca.png"> <img src="https://www.sthda.com/french/french/upload/mini_var_pca.png" alt="" class="valign_" /></a><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-qualite-de-la-representation-d-une-variable-selon-un-axe-principal">qualit? de la repr?sentation d'une variable selon un axe principal</h3><br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/important.png" alt="" class="valign_" /> Les coordonn?es des variables sont repr?sent?es par  les coefficient de corr?lation des variables avec les diff?rentes composantes.<br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/important.png" alt="" class="valign_" /> La qualit? de la repr?sentation d'une variable selon un axe principal est donn? par le carr? de son coefficient de corr?lation avec cet axe et repr?sente le cosinus carr?.  COS2 = COR*COR<br />
<br />
Pour chaque variable la somme horizontale(lorsque l'on prend toutes les composantes) est ?gale ? 1 (100%).<br />
La qualit? de la repr?sentation d'une variable sur les axes s?lectionn?s est la somme des COS2 des axes.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-poids-d-une-variable-dans-la-definition-d-une-composante-principale">Poids d'une variable dans la d?finition d'une composante principale</h3><br />
<br />
C'est la part en % du COS2 de la variable.<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-plan-des-individus">Plan des individus</h2><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-representation-des-individus-sur-les-2-premiers-axes">Repr?sentation des individus sur les 2 premiers axes</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/ind_pca.png"> <img src="https://www.sthda.com/french/french/upload/mini_ind_pca.png" alt="" class="valign_" /></a><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-representation-simultanee-des-individus-et-des-variables">Repr?sentation simultan?e des individus et des variables</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/biplot_acp.png"> <img src="https://www.sthda.com/french/french/upload/mini_biplot_acp.png" alt="" class="valign_" /> </a><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-qualite-de-la-representation-des-individus-en-selon-les-composantes-principales">Qualit? de la repr?sentation des individus en % selon les composantes principales</h3><br />
<br />
La qualit? de la repr?sentation d'un individu par un axe U est donn?e par le COS2 de l'angle form? avec cet axe<br />
<br />
La qualit? de la repr?sentation d'un point M par un plan factoriel constitu? de 2 axes est mesur?e par la<br />
somme des cos2 avec 2 axes]]></description>
			<pubDate>Sat, 11 Jun 2011 11:55:47 +0200</pubDate>
			
		</item>
		
	</channel>
</rss>
