Skip to main content
edited body; edited title
Source Link
Jeremy Miles
  • 19k
  • 6
  • 46
  • 82

Correspondance Correspondence Analysis R

I have a dataframe with 100k rows and 20 binary variables, one of which is my target.

I would like to apply a CorrespondanceCorrespondence Analysis (CA) on it, but I have a few doubts:

  1. should the target column be included into the CA?

  2. CA is a way to analyze a large contingency table. The command table is used to get the contingency table but I get as many 2x2 tables as there are pairwise combinations of variables. Instead, correct me if I'm wrong, I need just one table with the counts for each column relative to my target variable, like:

            var1    var2   ...  var19 
    target
    
      0      73k     45k   ...   60k
    
      1      37k     55k   ...   40k
    

    Is there an R function that does this?

Correspondance Analysis R

I have a dataframe with 100k rows and 20 binary variables, one of which is my target.

I would like to apply a Correspondance Analysis (CA) on it, but I have a few doubts:

  1. should the target column be included into the CA?

  2. CA is a way to analyze a large contingency table. The command table is used to get the contingency table but I get as many 2x2 tables as there are pairwise combinations of variables. Instead, correct me if I'm wrong, I need just one table with the counts for each column relative to my target variable, like:

            var1    var2   ...  var19 
    target
    
      0      73k     45k   ...   60k
    
      1      37k     55k   ...   40k
    

    Is there an R function that does this?

Correspondence Analysis R

I have a dataframe with 100k rows and 20 binary variables, one of which is my target.

I would like to apply a Correspondence Analysis (CA) on it, but I have a few doubts:

  1. should the target column be included into the CA?

  2. CA is a way to analyze a large contingency table. The command table is used to get the contingency table but I get as many 2x2 tables as there are pairwise combinations of variables. Instead, correct me if I'm wrong, I need just one table with the counts for each column relative to my target variable, like:

            var1    var2   ...  var19 
    target
    
      0      73k     45k   ...   60k
    
      1      37k     55k   ...   40k
    

    Is there an R function that does this?

edited tags
Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663

I have a dataframe with 100k rows and 20 binary variables, one of which is my target.

I would like to apply CAa Correspondance Analysis (CA) on it, but I have a few doubts:

  1. should the target column be included into the CA?

  2. CA is a way to analyze a large contingency table. The command table is used to get the contingency table but I get as many 2x2 tables as there are pairwise combinations of variables. Instead, correct me if I'm wrong, I need just one table with the counts for each column relative to my target variable, like:

            var1    var2   ...  var19 
    target
    
      0      73k     45k   ...   60k
    
      1      37k     55k   ...   40k
    

    Is there an R function that does this?

I have a dataframe with 100k rows and 20 binary variables, one of which is my target.

I would like to apply CA on it, but I have a few doubts:

  1. should the target column be included into the CA?

  2. CA is a way to analyze a large contingency table. The command table is used to get the contingency table but I get as many 2x2 tables as there are pairwise combinations of variables. Instead, correct me if I'm wrong, I need just one table with the counts for each column relative to my target variable, like:

            var1    var2   ...  var19 
    target
    
      0      73k     45k   ...   60k
    
      1      37k     55k   ...   40k
    

    Is there an R function that does this?

I have a dataframe with 100k rows and 20 binary variables, one of which is my target.

I would like to apply a Correspondance Analysis (CA) on it, but I have a few doubts:

  1. should the target column be included into the CA?

  2. CA is a way to analyze a large contingency table. The command table is used to get the contingency table but I get as many 2x2 tables as there are pairwise combinations of variables. Instead, correct me if I'm wrong, I need just one table with the counts for each column relative to my target variable, like:

            var1    var2   ...  var19 
    target
    
      0      73k     45k   ...   60k
    
      1      37k     55k   ...   40k
    

    Is there an R function that does this?

Source Link
IDK
  • 125
  • 4
Loading