Re: [R] MCA in R

2008-06-13 Thread John Fox
Dear Kimmo,

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
 Behalf Of K. Elo
 Sent: June-13-08 1:43 AM
 To: r-help@r-project.org
 Subject: Re: [R] MCA in R
 
 Dear John,
 
 thanks for Your quick reply.
 
  John Fox wrote:
  Dear Kimmo,
 
  MCA is a rather old name (introduced, I think, in the 1960s by
  Songuist and Morgan in the OSIRIS package) for a linear model
  consisting entirely of factors and with only additive effects --
  i.e., an ANOVA model will no interactions.
 
 It is true, that MCA is an old name, but the technique itself is still
 robust, I think. The problem I am facing is that I have a research
 project where I try to find out which factors affect measured knowledge
 of a specific issue. As predictors I have formal education, interest,
 gender and consumption of different medias (TV, newspapers etc.). Now,
 these are correlated predictors and running e.g. a simple anova
 (anova(lm(...)) as You suggested) won't - if I have understood correctly
 - consider the problem of correlated predictors. MCA would do this.

That's because anova() calculates sequential (type-I) sums of squares; if
you use the Anova() function in the car package, for example, you'll get
so-called type-II sums of squares -- for each factor after the others. You
could also more tediously do these tests directly using the anova()
function, by contrasting alternative models: the full model and the model
deleting each factor in turn.

 
 A colleague of mine has run anova and MCA in SPSS and the results differ
 significantly.

Yes, see above.

  Because I am more familiar with R, I just hoped that this
 marvelous statistical package could handle MCA, too :)
 
  Typically, the results of
  an MCA are reported using adjusted means. You could compute these
  manually, or via the effects package.
 
 Well, I am interested in the eta and beta values, too. 

Aren't the eta values just the square-roots of the R^2's from the individual
one-way ANOVAs? I don't remember how the betas are defined, but do recall
that they are a peculiar attempt to define standardized partial regression
coefficients for factors that combine all of the levels.

 I have tried to
 use the effects package but my attempts with all.effects resulted in
 errors. I have to figure out what's going wrong here :)

If you tell me what you did, ideally including an example that I can
reproduce, I can probably tell you what's wrong.

Regards,
 John

 
 Kind regards,
 Kimmo Elo
 
 --
 University of Turku, Finland
 Dep. of political science
 
 __
 R-help@r-project.org mailing list
 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.

__
R-help@r-project.org mailing list
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.


Re: [R] MCA in R

2008-06-13 Thread Prof Brian Ripley
Although John Fox naturally mentions his Anova function, I would like to 
point out that drop1() (and MASS::dropterm) also does the tests of Type-II 
ANOVA of which John says 'more tediously do these tests directly'.


It seems a lot easier to teach newcomers about drop1() than to introduce 
the SAS terminology and then say (to quote ?Anova)


  'the definitions used here do not correspond precisely to those
   employed by SAS'

(I would welcome a description of the precise differences on the Anova 
help page.)



On Fri, 13 Jun 2008, John Fox wrote:


Dear Kimmo,


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

On

Behalf Of K. Elo
Sent: June-13-08 1:43 AM
To: r-help@r-project.org
Subject: Re: [R] MCA in R

Dear John,

thanks for Your quick reply.


John Fox wrote:
Dear Kimmo,

MCA is a rather old name (introduced, I think, in the 1960s by
Songuist and Morgan in the OSIRIS package) for a linear model
consisting entirely of factors and with only additive effects --
i.e., an ANOVA model will no interactions.


It is true, that MCA is an old name, but the technique itself is still
robust, I think. The problem I am facing is that I have a research
project where I try to find out which factors affect measured knowledge
of a specific issue. As predictors I have formal education, interest,
gender and consumption of different medias (TV, newspapers etc.). Now,
these are correlated predictors and running e.g. a simple anova
(anova(lm(...)) as You suggested) won't - if I have understood correctly
- consider the problem of correlated predictors. MCA would do this.


That's because anova() calculates sequential (type-I) sums of squares; if
you use the Anova() function in the car package, for example, you'll get
so-called type-II sums of squares -- for each factor after the others. You
could also more tediously do these tests directly using the anova()
function, by contrasting alternative models: the full model and the model
deleting each factor in turn.



A colleague of mine has run anova and MCA in SPSS and the results differ
significantly.


Yes, see above.


 Because I am more familiar with R, I just hoped that this
marvelous statistical package could handle MCA, too :)


Typically, the results of
an MCA are reported using adjusted means. You could compute these
manually, or via the effects package.


Well, I am interested in the eta and beta values, too.


Aren't the eta values just the square-roots of the R^2's from the individual
one-way ANOVAs? I don't remember how the betas are defined, but do recall
that they are a peculiar attempt to define standardized partial regression
coefficients for factors that combine all of the levels.


I have tried to
use the effects package but my attempts with all.effects resulted in
errors. I have to figure out what's going wrong here :)


If you tell me what you did, ideally including an example that I can
reproduce, I can probably tell you what's wrong.

Regards,
John



Kind regards,
Kimmo Elo

--
University of Turku, Finland
Dep. of political science

__
R-help@r-project.org mailing list
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.


__
R-help@r-project.org mailing list
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.



--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
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.


Re: [R] MCA in R

2008-06-13 Thread John Fox
Dear Brian,

 -Original Message-
 From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
 Sent: June-13-08 8:13 AM
 To: John Fox
 Cc: 'K. Elo'; r-help@r-project.org
 Subject: Re: [R] MCA in R
 
 Although John Fox naturally mentions his Anova function, I would like to
 point out that drop1() (and MASS::dropterm) also does the tests of Type-II
 ANOVA of which John says 'more tediously do these tests directly'.

It's true that for an additive model (such as Kimmo's), drop1() and Anova()
produce the same sums of squares, but for a model in which some terms are
marginal to others, drop1() produces tests only for the high-order terms.
One could specify scope = ~ . to drop1(), but that produces so-called
type-III tests. Perhaps there's some convenient way around this of which
I'm unaware.

 
 It seems a lot easier to teach newcomers about drop1() than to introduce
 the SAS terminology and then say (to quote ?Anova)
 
'the definitions used here do not correspond precisely to those
 employed by SAS'
 
 (I would welcome a description of the precise differences on the Anova
 help page.)

As I recall, the differences are for type-III tests, where in Anova()
these are dependent upon contrast coding.

Regards,
 John

 
 
 On Fri, 13 Jun 2008, John Fox wrote:
 
  Dear Kimmo,
 
  -Original Message-
  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
  On
  Behalf Of K. Elo
  Sent: June-13-08 1:43 AM
  To: r-help@r-project.org
  Subject: Re: [R] MCA in R
 
  Dear John,
 
  thanks for Your quick reply.
 
  John Fox wrote:
  Dear Kimmo,
 
  MCA is a rather old name (introduced, I think, in the 1960s by
  Songuist and Morgan in the OSIRIS package) for a linear model
  consisting entirely of factors and with only additive effects --
  i.e., an ANOVA model will no interactions.
 
  It is true, that MCA is an old name, but the technique itself is still
  robust, I think. The problem I am facing is that I have a research
  project where I try to find out which factors affect measured knowledge
  of a specific issue. As predictors I have formal education, interest,
  gender and consumption of different medias (TV, newspapers etc.). Now,
  these are correlated predictors and running e.g. a simple anova
  (anova(lm(...)) as You suggested) won't - if I have understood
correctly
  - consider the problem of correlated predictors. MCA would do this.
 
  That's because anova() calculates sequential (type-I) sums of squares;
if
  you use the Anova() function in the car package, for example, you'll get
  so-called type-II sums of squares -- for each factor after the others.
You
  could also more tediously do these tests directly using the anova()
  function, by contrasting alternative models: the full model and the
model
  deleting each factor in turn.
 
 
  A colleague of mine has run anova and MCA in SPSS and the results
differ
  significantly.
 
  Yes, see above.
 
   Because I am more familiar with R, I just hoped that this
  marvelous statistical package could handle MCA, too :)
 
  Typically, the results of
  an MCA are reported using adjusted means. You could compute these
  manually, or via the effects package.
 
  Well, I am interested in the eta and beta values, too.
 
  Aren't the eta values just the square-roots of the R^2's from the
 individual
  one-way ANOVAs? I don't remember how the betas are defined, but do
recall
  that they are a peculiar attempt to define standardized partial
regression
  coefficients for factors that combine all of the levels.
 
  I have tried to
  use the effects package but my attempts with all.effects resulted in
  errors. I have to figure out what's going wrong here :)
 
  If you tell me what you did, ideally including an example that I can
  reproduce, I can probably tell you what's wrong.
 
  Regards,
  John
 
 
  Kind regards,
  Kimmo Elo
 
  --
  University of Turku, Finland
  Dep. of political science
 
  __
  R-help@r-project.org mailing list
  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.
 
  __
  R-help@r-project.org mailing list
  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.
 
 
 --
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] MCA in R

2008-06-12 Thread K. Elo

Dear John,

thanks for Your quick reply.


John Fox wrote:
Dear Kimmo,

MCA is a rather old name (introduced, I think, in the 1960s by
Songuist and Morgan in the OSIRIS package) for a linear model
consisting entirely of factors and with only additive effects --
i.e., an ANOVA model will no interactions.


It is true, that MCA is an old name, but the technique itself is still 
robust, I think. The problem I am facing is that I have a research 
project where I try to find out which factors affect measured knowledge 
of a specific issue. As predictors I have formal education, interest, 
gender and consumption of different medias (TV, newspapers etc.). Now, 
these are correlated predictors and running e.g. a simple anova 
(anova(lm(...)) as You suggested) won't - if I have understood correctly 
- consider the problem of correlated predictors. MCA would do this.


A colleague of mine has run anova and MCA in SPSS and the results differ 
significantly. Because I am more familiar with R, I just hoped that this 
marvelous statistical package could handle MCA, too :)



Typically, the results of
an MCA are reported using adjusted means. You could compute these
manually, or via the effects package.


Well, I am interested in the eta and beta values, too. I have tried to 
use the effects package but my attempts with all.effects resulted in 
errors. I have to figure out what's going wrong here :)


Kind regards,
Kimmo Elo

--
University of Turku, Finland
Dep. of political science

__
R-help@r-project.org mailing list
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.


Re: [R] MCA in R

2008-06-11 Thread John Fox
Dear Kimmo,

MCA is a rather old name (introduced, I think, in the 1960s by Songuist and 
Morgan in the OSIRIS package) for a linear model consisting entirely of factors 
and with only additive effects -- i.e., an ANOVA model will no interactions. 
You can fit such a model with lm() -- e.g., lm(y ~ f1 + f2 + etc.). Typically, 
the results of an MCA are reported using adjusted means. You could compute 
these manually, or via the effects package.

I hope this helps,
 John

--
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of K. Elo
 Sent: June-11-08 1:07 AM
 To: r-help@r-project.org
 Subject: [R] MCA in R
 
 Hi!
 
 Is there any possibilities to do multiple classification analysis (MCA)
 in R? (MCA examines the relationships between several categorical
 independent variables and a single dependent variable, and determines
 the effects of each predictor before and after adjus­tment for its
 inter-correlations with other predictors in the analysis).
 
 Kind regrads,
 Kimmo Elo
 
 ---
 University of Turku, Finland
 Dep. of political science
 
 __
 R-help@r-project.org mailing list
 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.

__
R-help@r-project.org mailing list
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.