Dear R-users,
I have found this not-so-recent post in the archives -
http://tolstoy.newcastle.edu.au/R/devel/00a/0291.html - while I was
looking for a particular way to reorder factor levels. The question
addressed by the author was to know if the read.table function could be
modified to
You can create your own class and pass that to read table. In
the example below Fld2 is read in with factor levels C, A, B
in that order.
library(methods)
setClass(my.levels)
setAs(character, my.levels,
function(from) factor(from, levels = c(C, A, B)))
### test ###
Input - Fld1 Fld2
10 A
Thanks Gabor, I have two questions:
1- Is there any difference between your code and the following one, with
regards to Fld2 ?
### test ###
Input - Fld1 Fld2
10 A
20 B
30 C
40 A
DF - read.table(textConnection(Input), header = TRUE)
DF$Fld2-factor(DF$Fld2,levels= c(C, A, B)))
2- do you see
Its not clear from your description what you want.
Could you be a bit more specific including an example.
On 8/28/07, Sébastien [EMAIL PROTECTED] wrote:
Thanks Gabor, I have two questions:
1- Is there any difference between your code and the following one, with
regards to Fld2 ?
### test ###
Ok, I cannot send to you one of my dataset since they are confidential.
But I can produce a dummy mini dataset to illustrate my question.
Let's say I have a csv file with 3 columns and 20 rows which content is
reproduced by the following line.
mydata-data.frame(a=1:20,
Its the same principle. Just change the function to be suitable. This one
arranges the levels according to the input:
library(methods)
setClass(my.factor)
setAs(character, my.factor,
function(from) factor(from, levels = unique(from)))
Input - a b c
1 1 176 w
2 2 141 k
3 3 172 r
4 4
d q f
Peter Alspach
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sébastien
Sent: Wednesday, 29 August 2007 9:00 a.m.
To: Gabor Grothendieck
Cc: R-help
Subject: Re: [R] Factor levels
Ok, I cannot send to you one of my dataset since
.
To: Gabor Grothendieck
Cc: R-help
Subject: Re: [R] Factor levels
Ok, I cannot send to you one of my dataset since they are
confidential.
But I can produce a dummy mini dataset to illustrate my question.
Let's say I have a csv file with 3 columns and 20 rows which
content is reproduced
I haven't seen an answer to this post, so I thought I would try to
generate a response.
Regarding your first question (Can i use this factor analysis
somehow despite the poor cumulative variance of the first three factors
?), I would ask, for what purpose? And, What are the
Hi there,
i´ve trouble understanding the factanal output of R.
i am running a a FA on a dataset with 10 variables.
i plotted eigenvalues to finde out how many factors to try.
i think the elbow is @ 3 factors.
here are my eigenvalues: 2.6372766 1.5137754 1.0188919 0.8986154
0.8327583 0.7187473
I wrote some rough functions for principal factor,
principal-components factor, and iterated principal factor analysis.
I think they are workable, the same results as stata can be retained.
In addition, functions for gls and uls factor analysis is in progress,
which is based on the algorithms of
Hi,
is there any other routine for factor analysis in R then factanal?
Basically I'am interested in another extraction method then the maximum
likelihood method and looking for unweighted least squares.
Thanks in advance
Sigbert Klinke
__
Hi all.
I think it would be nice to be able to combine levels of a factor on
creation a la
x - rep(0:5,5)
y - factor(x,levels=0:5,labels=c('1','1',2:5)) ## (1)
y
[1] 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5
Levels: 1 1 2 3 4 5
I thougt this would (should?) create a
/
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steen Ladelund
Sent: Wednesday, 30 May 2007 6:27 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Factor function: odd behavior when labels argument
containsduplicates?
Hi all.
I think it would be nice to be able
Hi,
In a discussion of factor analysis in Using Multivariate Statistics by
Tabachnick and Fidell, two matrices are singled out as important for
interpreting an exploratory factor analysis (EFA) with an oblique promax
rotation. One is the structure matrix. The structure matrix contains the
Hi,
In a discussion of factor analysis in Using Multivariate Statistics by
Tabachnick and Fidell, two matrices are singled out as important for
interpreting an exploratory factor analysis (EFA) with an oblique promax
rotation. One is the structure matrix. The structure matrix contains the
At 09:41 28.02.2007 +1030, Geoff Russell wrote:
There is a warning in the documentation for ?factor (R version 2.3.0)
as follows:
The interpretation of a factor depends on both the codes and the
'levels' attribute. Be careful only to compare factors with the
same set of levels (in the same
There is a warning in the documentation for ?factor (R version 2.3.0)
as follows:
The interpretation of a factor depends on both the codes and the
'levels' attribute. Be careful only to compare factors with the
same set of levels (in the same order). In particular,
'as.numeric' applied
Geoff Russell wrote:
There is a warning in the documentation for ?factor (R version 2.3.0)
as follows:
The interpretation of a factor depends on both the codes and the
'levels' attribute. Be careful only to compare factors with the
same set of levels (in the same order). In
TeamInfo
TEAMNAME LEVEL WORKTIME BONUS
1 batch sunan B 135 9,818
2 batch Chenqi E 121 6,050
3 batch jiangxu F 97 4,189
4 online zhouxi F 63 2,720
5 online chenhe H 36 1,064
## try:
factor(TeamInfo$TEAM)
[1] batch batch batch
Is there any R function to perform factor analysis using Principal
Component Method?
why factanal() method is always mle ?
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
The 'factor.model.stat' function that is available in
the public domain area of the Burns Statistics website
may or may not satisfy your needs.
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and A Guide for the Unwilling S User)
Mario Alfonso
Mario Alfonso Morales Rivera wrote:
Is there any R function to perform factor analysis using Principal
Component Method?
why factanal() method is always mle ?
Because PCM is not factor analysis (the two methods fit different
models) and R didn't want to take part in the mislabeling
On Fri, 6 Oct 2006, Christian Bieli wrote:
Hi all
I have to generate some test data for import in an sql database. The
database is meant for web-based data entry in a study taking place in a
german speaking region, so factor levels of the variables include umlauts.
The variables in the
Thanks for your answer.
I went round the problem by directly connect to the sql-database instead
of generating a .csv file and then upload it.
This works perfectly with the RODBC package and is much more suitable, too.
Kind regards
Christian
Prof Brian Ripley schrieb:
On Fri, 6 Oct 2006,
Hi all
I have to generate some test data for import in an sql database. The
database is meant for web-based data entry in a study taking place in a
german speaking region, so factor levels of the variables include umlauts.
The variables in the dataframe t.muster are generated e.g. like this:
Hi
all culumns which are used for discrimination (in your case 3) are
factor. If you want to change them to numeric you has to use
as.numeric(as.character(x[,3]))
I believe it is in FAQ.
HTH
Petr
Please use sensible subject.
On 12 Sep 2006 at 14:49, Anders Eklund wrote:
Date sent:
Hi,
I found a discrepancy between results in R and Stata for a factor analysis
with a promax rotation. For Stata:
. *rotate, factor(2) promax*
(promax rotation)
Rotated Factor Loadings
Variable | 1 2Uniqueness
I don't believe promax is uniquely defined. Not only are there
differences in the criterion (R allows a choice), it is an optimization
problem with multiple local optima.
In fact the same is true of factanal, and the first thing to check would
be to see if the same FA solution has been found.
I have got factor from read.xls:
is(factor_value)
[1] factor oldClass
[288] -0.32 0.180.180.18-0.32 0.180.68
[295] 0.680.18
43 Levels: -0.05 -0.13 -0.15 -0.18 -0.20 -0.26 ... 1.33
If I am using the funciton as.real(factor_value)
I get
[271] 17
You can use as.is = TRUE arg to read.xls to get character
data rather than factors.
On 5/3/06, Knut Krueger [EMAIL PROTECTED] wrote:
I have got factor from read.xls:
is(factor_value)
[1] factor oldClass
[288] -0.32 0.180.180.18-0.32 0.180.68
[295] 0.680.18
I have a data frame that I plan on importing from a file (there are
other columns of numeric data):
xy
x y
1 1 1
2 1 1
3 1 1
4 1 1
5 2 2
6 2 2
7 2 2
8 2 2
where x is a column of factors, and y is a column of factors, that have
different levels, e.g.,
x
[1] low low low low hi hi hi hi
Stephen C. Upton wrote:
I have a data frame that I plan on importing from a file (there are
other columns of numeric data):
xy
x y
1 1 1
2 1 1
3 1 1
4 1 1
5 2 2
6 2 2
7 2 2
8 2 2
where x is a column of factors, and y is a column of factors, that have
different levels,
Hello!
How can I do a factor analysis backwards to get an arbitrary covarianz
matrix out of an arbitrary number of generated random variables that
have a correlation near zero. Or the same question shorter: How to
generate random variables that have a spezial correlation pattern.
I would like
more, as described in the posting guide (have you read it?)
-- Bert Gunter
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stefan Premke
Sent: Wednesday, April 12, 2006 6:52 AM
To: r-help@stat.math.ethz.ch
Subject: [R] factor analysis backwards
Hello!
How
Stefan Premke wrote:
Hello!
How can I do a factor analysis backwards to get an arbitrary covarianz
matrix out of an arbitrary number of generated random variables that
have a correlation near zero. Or the same question shorter: How to
generate random variables that have a spezial
I am very new to factor analysis as well as R. I am trying to run a factor
analysis on the residual returns on common stock (residual to some model) and
trying to determine if there are any strong factors remaining. After running
factanal, I can obtain the factor loadings but how do I get
On Fri, 27 Jan 2006, Krish Krishnan wrote:
I am very new to factor analysis as well as R. I am trying to run a
factor analysis on the residual returns on common stock (residual to
some model) and trying to determine if there are any strong factors
remaining. After running factanal, I can
Dear all
I encountered strange problem with split factor. I tried to use
boxplot(split(, factor)) but I got an error message
split(test$asar,kvartaly)
Error in split(x, f) : second argument must be a factor
str(kvartaly)
Factor w/ 8 levels 1Q.04,2Q.04,..: 1 1 1 1 1 1 1 1 1 1 ...
:
Date sent: Thu, 6 Oct 2005 17:08:17 +0200
From: Florence Combes [EMAIL PROTECTED]
To: Duncan Murdoch [EMAIL PROTECTED],
r-help@stat.math.ethz.ch
Subject:Re: [R] factor : how does it work ?
Send reply to: Florence Combes
Dear all,
I try for long to understand exactly what is the factor type and especially
how it works, but it seems too difficult for me
I read paragraphs about it, and I understand quite well what it is (I think)
but I still can't figure how to deal with.
Especially these 2 mysteries (for me) :
On 10/6/2005 9:14 AM, Florence Combes wrote:
Dear all,
I try for long to understand exactly what is the factor type and especially
how it works, but it seems too difficult for me
I read paragraphs about it, and I understand quite well what it is (I think)
but I still can't figure how to
2d I can't manage to deal with factors, so when I have some, I
transform
them in vectors (with levels()), but I think I miss the power and
utility
of
the factor type ?
levels() is not the conversion you want.
in fact I use
'as.numeric(levels(f))[f]'
(from the ?factor
On 10/6/2005 10:20 AM, Florence Combes wrote:
2d I can't manage to deal with factors, so when I have some, I
transform
them in vectors (with levels()), but I think I miss the power and
utility
of
the factor type ?
levels() is not the conversion you want.
in fact I use
a last question, and thanks a million for your patience and your
explanations ...
I tried with a df called merged and a column named Pcc_0h_A (which is
numeric values):
length(as.vector(merged$Pcc_0h_A))
[1] 12202
as.numeric(as.vector(merged$Pcc_0h_A)[1:10])
[1] 12.276 11.958 14.098 13.843
On 10/6/2005 10:50 AM, Florence Combes wrote:
a last question, and thanks a million for your patience and your
explanations ...
I tried with a df called merged and a column named Pcc_0h_A (which is
numeric values):
length(as.vector(merged$Pcc_0h_A))
[1] 12202
head(merged)
ID Name Pcc_0h_A Pcc_0h_swapped_A
3302 301495 Q0010_01 |Q0010||Hypothetical ORF 12.276 11.716
6943 309175 Q0010_01 |Q0010||Hypothetical ORF 11.958 11.271
14065 298935 Q0017_01 |Q0017||Hypothetical ORF 14.098 13.122
6420 306615 Q0017_01 |Q0017||Hypothetical ORF 13.843 13.061
5066
Does the follow help?
aFactor - factor(rep(letters[1:3], 1:3))
aFactor
[1] a b b c c c
Levels: a b c
for(af in levels(aFactor)){
+ print(sum(aFactor==af))
+ }
[1] 1
[1] 2
[1] 3
spencer graves
Tord Snall wrote:
Dear all,
I would like to use the values in
Dear Spencer,
Does the follow help?
Yes, as did the earlier replies. Thanks!
Tord
aFactor - factor(rep(letters[1:3], 1:3))
aFactor
[1] a b b c c c
Levels: a b c
for(af in levels(aFactor)){
+ print(sum(aFactor==af))
+ }
[1] 1
[1] 2
[1] 3
spencer graves
Dear all,
I would like to use the values in vegaggr.BLMCMR02$colony
str(vegaggr.BLMCMR02)
`data.frame': 1678 obs. of 3 variables:
$ vegtype : Factor w/ 27 levels 2010,2020,..: 3 4 5 19 4 5 19 5
$ colony: Factor w/ 406 levels 0,1,10,100,..: 1 1 1 1 2 2 2
$ Totvegproparea: num
Tord Snall [EMAIL PROTECTED] writes:
Dear all,
I would like to use the values in vegaggr.BLMCMR02$colony
str(vegaggr.BLMCMR02)
`data.frame': 1678 obs. of 3 variables:
$ vegtype : Factor w/ 27 levels 2010,2020,..: 3 4 5 19 4 5 19 5
$ colony: Factor w/ 406 levels
On 9/19/05, Tord Snall [EMAIL PROTECTED] wrote:
Dear all,
I would like to use the values in vegaggr.BLMCMR02$colony
str(vegaggr.BLMCMR02)
`data.frame': 1678 obs. of 3 variables:
$ vegtype : Factor w/ 27 levels 2010,2020,..: 3 4 5 19 4 5 19 5
$ colony: Factor w/ 406 levels
Using RODBC, when I select from a table strings (chars and varchars)
come as factors. What is the best way, speed wise, to convert these
columns back to strings (perhaps using as.character).
__
R-help@stat.math.ethz.ch mailing list
On Tue, 28 Jun 2005, Omar Lakkis wrote:
Using RODBC, when I select from a table strings (chars and varchars)
come as factors. What is the best way, speed wise, to convert these
columns back to strings (perhaps using as.character).
FAQ Q7.10, replacing numeric by character.
You do have
Hi,
I have one question on factor vector.
I have 3 factor vectors:
a-factor(c(1, 2, 3))
b-factor(c(a, b, c))
c-factor(c(b, a, c))
what I want is like:
c x
1 b 2
2 a 1
3 c 3
which means, I use b as keys and vector a as values and I find values for c.
I used the following codes:
x-c()
On 6/3/05, Weiwei Shi [EMAIL PROTECTED] wrote:
Hi,
I have one question on factor vector.
I have 3 factor vectors:
a-factor(c(1, 2, 3))
b-factor(c(a, b, c))
c-factor(c(b, a, c))
what I want is like:
c x
1 b 2
2 a 1
3 c 3
which means, I use b as keys and vector a as values and I
hi all,
In the library ade4, there are two eigenanalysis which enable the ordination
of the categorical variables.
1- Multiple Correspondence Analysis (MCA, Tenenhaus Young 1985) performs the
multiple correspondence analysis of a factor table (see the
function dudi.acm). this function is
Hi all --
I'm running a Factor Analysis on my dataset, and I've located the
factanal() and princomp() methods. I don't want to do a PCA, so it
looks like I should use factanal(), but factanal() requires specifying
the number of factors you expect from the analysis.
Are there any
On Fri, 2005-04-15 at 12:49 +1200, Brett Stansfield wrote:
Dear R
Dear S,
When I go to do the biplot
biplot(eurofood.fa$scores, eurofood$loadings)
Error in 1:p : NA/NaN argument
Potential sources of error (guessing: no sufficient detail given in the
message):
- you ask scores from
Dear R help
I am having difficulty doing a biplot of the first two factors of a factor
analysis. I presume it is because the values in factor 2 for Milk and NUTS
are not displayed in the component loadings.
Loadings:
Factor1 Factor2
RedMeat0.561 -0.112
WhiteMeat 0.593 -0.432
Dear R
When I go to do the biplot
biplot(eurofood.fa$scores, eurofood$loadings)
Error in 1:p : NA/NaN argument
I think this is because the component loadings don't show values for some
variables
Loadings:
Factor1 Factor2
RedMeat0.561 -0.112
WhiteMeat 0.593 -0.432
Eggs
Dear All,
Assume I have a data.frame that contains also factors and I would like to
get another data.frame containing the factors as numeric vectors, to apply
functions like sapply(..., median) on them.
I read the warning concerning as.numeric or unclass, but in my case this
makes sense, because
Try this:
data.matrix(df.f12)
On Apr 2, 2005 6:01 AM, Heinz Tuechler [EMAIL PROTECTED] wrote:
Dear All,
Assume I have a data.frame that contains also factors and I would like to
get another data.frame containing the factors as numeric vectors, to apply
functions like sapply(..., median) on
On Sat, 2 Apr 2005, Heinz Tuechler wrote:
Dear All,
Assume I have a data.frame that contains also factors and I would like to
get another data.frame containing the factors as numeric vectors, to apply
functions like sapply(..., median) on them.
I read the warning concerning as.numeric or unclass,
At 07:15 02.04.2005 -0500, Gabor Grothendieck wrote:
Try this:
data.matrix(df.f12)
Perfect! This is exactly what I needed.
Many thanks,
Heinz Tüchler
On Apr 2, 2005 6:01 AM, Heinz Tuechler [EMAIL PROTECTED] wrote:
Dear All,
Assume I have a data.frame that contains also factors and I would
At 14:26 02.04.2005 +0100, Prof Brian Ripley wrote:
On Sat, 2 Apr 2005, Heinz Tuechler wrote:
Dear All,
Assume I have a data.frame that contains also factors and I would like to
get another data.frame containing the factors as numeric vectors, to apply
functions like sapply(..., median) on
Hi :)
Was just wondering whether someone could help me with
adjustments to trellis plots (parallel).
I've got two way multivariate data. I want to make
parallel plots for one of the factors, and want to color
the lines according to the other factor. The first thing I
manage, but with the
On Thursday 17 February 2005 04:39, T.A.Wassenaar wrote:
Hi :)
Was just wondering whether someone could help me with
adjustments to trellis plots (parallel).
I've got two way multivariate data. I want to make
parallel plots for one of the factors, and want to color
the lines according to
Hello,
I would like to conduct an exploratory factor analysis with dichotomous
data. Do any R routines exist for this purpose? I recall reading something
about methods with tetrachoric correlations.
Any help would be appreciated.
Best,
Tom Denson
Department of Psychology
University of Southern
:31 PM
To: [EMAIL PROTECTED]
Subject: [R] Factor analysis with dichotomous variables
Hello,
I would like to conduct an exploratory factor analysis with dichotomous
data. Do any R routines exist for this purpose? I recall reading
something about methods with tetrachoric correlations.
Any help would
]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Denson
Sent: Friday, December 17, 2004 12:31 PM
To: [EMAIL PROTECTED]
Subject: [R] Factor analysis with dichotomous variables
Hello,
I would like to conduct an exploratory factor analysis with dichotomous
data. Do any R routines exist for this purpose
Sorry if this is a FAQ.
Is there a good reason why a factor has to be
a one-dimensional vector and cannot be a matrix?
I want to construct matrices of categorical values.
Vain attempts like
matrix(factor(c(T,F,F,T), 2,2)
yield a matrix of character strings representing the factor levels,
I'm not sure, but is this what you want
matrix(as.numeric(factor(c(T,F,F,T))), 2,2)
Tom Mulholland
-Original Message-
From: Adrian Baddeley [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 December 2004 1:45 PM
To: [EMAIL PROTECTED]
Subject: [R] factor matrix
Sorry if this is a FAQ
matrix(as.numeric(factor(c(T,F,F,T))), 2,2)
No, this produces a matrix with numeric values,
not categorical values.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
] TRUE FALSE FALSE TRUE
Levels: FALSE TRUE
-Original Message-
From: Adrian Baddeley [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 December 2004 2:44 PM
To: Mulholland, Tom
Cc: [EMAIL PROTECTED]
Subject: RE: [R] factor matrix
matrix(as.numeric(factor(c(T,F,F,T))), 2,2
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
On Wed, 8 Sep 2004, Erich Neuwirth wrote:
The function I need is
valtype-function(x)
typeof(ifelse(is.factor(x),levels(x),x))
It is easy enough to write.
Are there any other special cases where the values
and the storage mode differ?
All classed objects are more than the internal
On Thu, 9 Sep 2004, Erich Neuwirth wrote:
The simple answer to my problem (are the values of a vector
numeric or not) is is.numeric, and that is enough for
what I need right now.
But this way I do not get an answer discriminating between
integers and and doubles. What is the canonical way of
typeof applied to a factor always seems to return integer,
independently of the type of the levels.
This has a strange side effect.
When a variable is imported into a data frame,
its type changes.
character variables automatically are converted
to factors when imported into data frames.
Here is an
?data.frame says:
Details:
A data frame is a list of variables of the same length with unique
row names, given class 'data.frame'.
'data.frame' converts each of its arguments to a data frame by
calling 'as.data.frame(optional=TRUE)'. As that is a generic
function,
In some cases it makes sense to store character variables as factors
(integers with labels) since this can take up much less memory. If
you really want to store `v2' as character, just do
data.frame(v1, I(v2))
-roger
Erich Neuwirth wrote:
typeof applied to a factor always seems to return
On Wed, 8 Sep 2004, Erich Neuwirth wrote:
typeof applied to a factor always seems to return integer,
independently of the type of the levels.
typeof is telling you the internal structure. From ?factor
'factor' returns an object of class 'factor' which has a set of
integer codes the
The function I need is
valtype-function(x)
typeof(ifelse(is.factor(x),levels(x),x))
It is easy enough to write.
Are there any other special cases where the values
and the storage mode differ?
The background for all this is that I am transferring data
from R to Excel with VBA and I have to
Therefore, I would like to know if there are other types of variables
(besides factors) which give a misunderstandable answer about
the type
of their values when asked typeof.
Your question is a bit combative, don't you think? R performs as documented,
so I think your characterization is
Note that I(v2) stores v2 as type character but not as class character.
For example,
R DF - data.frame(x = c(a, b), y = I(c(a, b)), z = I(c(a, b)))
R class(DF$z) - character
R sapply(DF, typeof) # y and z do have the same type
x y z
integer character character
Hello everyone, is there a package/packages for factor analysis,
particularly PCA?
thanks,
Katja
Katja Löytynoja
Taitoniekantie 9 A 218
40 740 Jyväskylä
Finland
tel.+35814 608058
cell.+35850 336 0174
[EMAIL PROTECTED]
__
[EMAIL PROTECTED]
Katja Loytynoja [EMAIL PROTECTED] writes:
Hello everyone, is there a package/packages for factor analysis,
particularly PCA?
help.search(factor analysis)
help.search(principal components)
(Whether PCA qualifies as factor analysis is debatable, though...)
--
O__ Peter Dalgaard
R comes with support for factor analysis and PCA (*not* the same thing)
in package stats which is normally loaded.
Try
help.search(factor analysis)
help.search(principal components)
On Tue, 15 Jun 2004, Katja Loytynoja wrote:
Hello everyone, is there a package/packages for factor analysis,
Hi,
I'm extracting data from a database with values for
different observation types in the same variable
(another variable deifnes the observation type). Some
of these observation types are factors, so R naturally
classifies the entire variable as a factor. I want to
select a subset and convert
Have you tried as.numeric(as.character(rsm2$Value))? The
construct as.numeric(rsm2$Value) returns the NUMERIC CODES for the
different levels; as.character(rsm2$Value) returns the character
representation, which you can then convert to numeric.
hope this helps. spencer graves
Hello:
The website
http://ourworld.compuserve.com/homepages/jsuebersax/tetra.htm might
provide you with further hints and information on implementing
polychoric correlations. Further information related to your inquiry can
also be found on http://www.unt.edu/rss/class/rich/5840/
In addition,
Dear Allan,
I assume that the categorical data are ordinal. There are methods for
factor analyzing ordinal data (e.g., using polychoric correlations) and
mixed ordinal and interval data, but as far as I know, these aren't
implemented in R.
John
On Thu, 13 May 2004 18:32:11 +0200
allan clark
hi all,
In the library ade4, there are two eigenanalysis which enable the ordination
of the categorical variables.
1- Multiple Correspondence Analysis (MCA, Tenenhaus Young 1985) performs the
multiple correspondence analysis of a factor table (see the
function dudi.acm).
2- the mixed
On 4 May 2004, Jari Oksanen wrote:
On Tue, 2004-05-04 at 09:34, Prof Brian Ripley wrote:
Yes, but princomp is the recommended way, not prcomp.
But the documentation seems to recommend prcomp:
For numerical accuracy, but not for flexibility.
?prcomp:
The calculation is
On Tue, 2004-05-04 at 09:56, Prof Brian Ripley wrote:
On 4 May 2004, Jari Oksanen wrote:
On Tue, 2004-05-04 at 09:34, Prof Brian Ripley wrote:
Yes, but princomp is the recommended way, not prcomp.
But the documentation seems to recommend prcomp:
For numerical accuracy, but
Hi Neil,
-Mensaje original-
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] nombre de [EMAIL PROTECTED]
Enviado el: lunes, 03 de mayo de 2004 23:22
Para: [EMAIL PROTECTED]
Asunto: [R] Factor loadings and principal component plots
Hi- Can anyone tell me the command(s
Well, factor loadings apply to factor analysis, not PCA, so have you
confused the two? (Lots of the literature does.)
On Mon, 3 May 2004 [EMAIL PROTECTED] wrote:
Hi- Can anyone tell me the command(s) to produce the following plots:
-Factor loadings plot for principal components
-Plot of
On Tue, 2004-05-04 at 09:34, Prof Brian Ripley wrote:
Yes, but princomp is the recommended way, not prcomp.
But the documentation seems to recommend prcomp:
?prcomp:
The calculation is done by a singular value decomposition of the
(centered and scaled) data matrix, not by using
Hi- Can anyone tell me the command(s) to produce the following plots:
-Factor loadings plot for principal components
-Plot of principal component scores
Also, apart from the prcomp (or princomp) command is there any other way to obtain
principal components and if so, how does it/they stack up
Hello,
is't possible to specify pattern in levels ?
y=c(ff,f,m,mm,fm,mf,ffm,mmf,mmm,fff);
factor(y)
[1] ff f m mm fm mf ffm mmf mmm fff
Levels: f ff fff ffm fm m mf mm mmf mmm
I want to specify levels using regexp (f.*,m.*) or use some
another method. So, I could have 2 levels, say,
1 - 100 of 115 matches
Mail list logo