Displaying 20 results from an estimated 26 matches for "nfactors".
Did you mean:
factors
2009 Mar 24
4
Error in FrF2 example on Mac OS
...r FrF2 did not work out for Mac OS due
to an error in an example that ran without error on all other platforms. I
do not find any reason for this. In the past, umlauts or tab characters have
sometimes been an issue, but I didn't find any of these. The function
definition is
FrF2(nruns = NULL, nfactors = NULL, factor.names = if (!is.null(nfactors)) {
if (nfactors <= 50) Letters[1:nfactors] else
paste("F", 1:nfactors, sep = "")} else NULL,
default.levels = c(-1, 1), generators = NULL, resolution = NULL,
estimable = NULL, max.nfree2fis = FALSE,
randomize = TRUE, seed = NULL,...
2011 Jun 03
0
How to reconcile Kalman filter result (by package dlm) with linear regression?
Hello All,
I am working with dlm for the purpose of estimating and forecasting with a Kalman filter model. I have succesfully set up the model and started generating results. Of course, I need to somehow be sure that the results make sense. Without any apparent target to compare with, my natural selection is the results by odinary least square. The idea being that if I choose a diffuse prior,
2011 Mar 03
2
PCA - scores
I am running a PCA, but would like to rotate my data and limit the
number of factors that are analyzed. I can do this using the
"principal" command from the psych package [principal(my.data,
nfactors=3,rotate="varimax")], but the issue is that this does not
report scores for the Principal Components the way "princomp" does.
My question is:
Can you get an output of scores using "principal" OR, is there a way
to limit the number of factors that are included whe...
2010 Nov 30
3
pca analysis: extract rotated scores?
...w to do so if I want to use
?principal in 'psych' and any of the GPArotation methods. For example,
require(psych)
r <- cor(mtcars[,c("am","carb","cyl","disp","drat","gear","hp","mpg")])
pca <- principal(r, nfactors = 8, residuals = T, rotate="none") # or
'varimax' or any other GPArotation supported rotation
pca
I've turned the 'pca' object and ?principal help page upside down and
I still cannot find anything that would resemble a 'scores' value. I'm
pretty sure it...
2008 Mar 06
2
Principle component analysis function
Dear All,
In a package, I want to use PCA function. The structure I used follow this
page: http://www.statmethods.net/advstats/factor.html.
fit<-principle(mydata, nfactors=9, rotation=TRUE)
or:
result<-PCA(mydata)
But I don't known why R language in my computer noticed: "not found
principle", "not found PCA".
I download and installed R-2.6.2-win32.exe.
Thanks alot for answering me.
Hue University, VietNam.
--
View this messa...
2012 Jan 18
2
computing scores from a factor analysis
Haj
i try to perform a principal component analysis by using a tetrachoric
correlation matrix as data input
tetra <- tetrachoric (image_na, correct=TRUE)
t_matrix <- tetra$rho
pca.tetra <- principal(t_matrix, nfactors = 10, n.obs = nrow(image_na),
rotate="varimax", scores=TRUE)
the problem i have is to compute the individual factor scores from the pca.
the code runs perfect if i do not ask for the scores
if i ask for the scores i get an error message
"Error in scale(x.matrix): object 'x.matr...
2009 Mar 31
3
Factor Analysis Output from R and SAS
...3 1 2
1 1 3 3 1 1
1 1 1 1 3 3
1 2 1 1 3 3
1 1 1 2 3 3
1 2 1 1 3 4
1 1 1 1 3 3
3 3 1 1 1 1
3 4 1 1 1 1
3 3 1 2 1 1
3 3 1 1 1 2
3 3 1 1 1 1
4 4 5 5 6 6
5 6 4 6 4 5
6 5 6 4 5 4
;
run;
proc factor data=fact rotate=varimax method=p nfactors=3;
var v1-v6;
run;
/* Output from SAS*/
The FACTOR
Procedure
Initial Factor Method: Principal
Components
Prior Communality Estimates:
ONE...
2017 Aug 06
3
SPSS R Factor v2.4.2
...have installed R Factor v2.4.2
This package requires 'polycor' library
Unfortunately, 'polycor' does not exist in R3.20
DATASET ACTIVATE DataSet1.
*M?rio Basto, Jos? Manuel Pereira, IPCA
*Required: SPSS 21 and R Integration Plugin
*R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS, R.utils.
set printback off.
Error in library(polycor) : there is no package called 'polycor'
This means the very good utility does not run in the way I have installed both R and SPSS
Does anyone know what I've done wrong and how to overcome this?
Prof. Gavin T L Brown,...
2012 Mar 26
2
SPSS R-Menu for Ordinal Factor Analysis
...XXXXXXXXXXXXXXXXXXXXXXX.
DATASET NAME DatenSet1 WINDOW=FRONT.
DATASET ACTIVATE DatenSet1.
SAVE OUTFILE='C:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/COMPRESSED.
*M?rio Basto, Jos? Manuel Pereira, IPCA
*Required: SPSS 19 and R Integration Plugin
*R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS.
set printback off.
--
Till Below (PhD Student)
Humboldt-Universit?t zu Berlin
2013 Dec 17
1
Polychoric Principal Component Analysis (pPCA)
...onses, smooth=TRUE,global=TRUE,polycor=F,
??????????? ML = FALSE,??std.err=FALSE,progress=TRUE)
#Regular PCA using stat, psych and FactoMiner, respectively
#There is no option for?including the matrix
princomp(responses, cor=TRUE) #What kind of correlation is used here?
?
principal(r = responses, nfactors = 3, rotate = "Promax")
principal(r = W, nfactors = 3, rotate = "Promax") #Do not work
PCA(responses, scale.unit=TRUE, ncp=3, graph=T)
#How to conduct polychoric principal component analysis using either of #the above package and producing individual and variable factor maps a...
2013 Mar 14
2
Same eigenvalues but different eigenvectors using 'prcomp' and 'principal' commands
...,2]
[1,] 1 0
[2,] 1 1
[3,] 4 2
pc=prcomp(gg,center=TRUE,scale=TRUE)
# The eigenvectors
pc$rotation
PC1 PC2
[1,] 0.7071068 0.7071068
[2,] 0.7071068 -0.7071068
# The eigenvalues:
> pc$sdev^2
[1] 1.8660254 0.1339746
2. PSYCH Package:
> pp=principal(gg,nfactors=2)
# The eigenvectors
> pp$loadings
Loadings:
PC1 PC2
[1,] 0.966 -0.259
[2,] 0.966 0.259
# The eigenvalues
pp$values
1] 1.8660254 0.1339746
Sincerely,
Arlindo
[[alternative HTML version deleted]]
2011 Mar 22
1
Find Principal Component Score per year
...1011 1974 54 58 3 5
1013 1974 65 52 9 24
1001 1975 67 56 1 23
1003 1975 63 55 6 1
1005 1975 60 51 1 47
1007 1975 62 49 7 10
1009 1975 68 50 9 32
1011 1975 55 58 3 5
1013 1975 66 52 9 27"),head=TRUE))
library(psych)
pcascores<-principal(pca[,-2], nfactors=1, score=TRUE)
However, the scores should be based on the observations per year rather than
the full set of observations. The final output should be a data frame with 7
rows (one for each id) and 4 columns (one for each year) filled with the
Principal Component Scores per id per year. Any ideas on...
2011 Jan 26
1
Factor rotation (e.g., oblimin, varimax) and PCA
...swers)$r[1:2,1:3]
princomp(answers, cor=FALSE)$l[1:2,1:3]
eigen(cov(answers))$ve[1:2,1:3]
# These 3 lines gives the same result
prcomp(answers, center=TRUE, scale=TRUE)$r[1:2,1:3]
princomp(answers, cor=TRUE)$l[1:2,1:3]
eigen(cor(answers))$ve[1:2,1:3]
# This gives another result
principal(answers, nfactors=3, rotate="none")$l[1:2,1:3]
Furthermore, I tried to use oblimin on the PCA loadings via prcomp and
'principal', but they give different results:
# These 2 lines give different results
oblimin(prcomp(answers, center=TRUE, scale=TRUE)$r[,1:3])$l[1:2,]
principal(answers, nfactor...
2017 Aug 06
0
SPSS R Factor v2.4.2
...out-of-date version of R. See:
ftp://cran.r-project.org/pub/R/src/contrib/Archive/polycor/
Good luck;
David.
>
> DATASET ACTIVATE DataSet1.
> *M?rio Basto, Jos? Manuel Pereira, IPCA
> *Required: SPSS 21 and R Integration Plugin
> *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS, R.utils.
> set printback off.
> Error in library(polycor) : there is no package called 'polycor'
>
> This means the very good utility does not run in the way I have installed both R and SPSS
> Does anyone know what I've done wrong and how to overcome this?...
2005 Mar 26
5
PCA - princomp can only be used with more units than variables
Hi all:
I am trying to do PCA on the following matrix.
N1 N2 A1 A2 B1 B2
gene_a 90 110 190 210 290 310
gene_b 190 210 390 410 590 610
gene_c 90 110 110 90 120 80
gene_d 200 100 400 90 600 200
>dataf<-read.table("matrix")
>
2008 Mar 05
2
Principle component analysis
Thanks to Mr.Liviu Androvic and Mr.Richard Rowe helped me in PCA.
Because I have just learn R language in a few day so I have many problem.
1) I don't know why PCA rotation function not run although I try many times.
Would you please hepl me and explain how to read the PCA map (both of
rotated and unrotated) in a concrete example.
2) Where I can find document relate: Plan S(A), S(A*B),
2008 Mar 13
1
factanal and plotting?
Hi there!
To make a good choice for the estimation of the number of usefull
factors. And I'd like to plot a graph like:
http://de.wikipedia.org/wiki/Bild:Parallelanalyse.jpg
where I don't need the green line (random values).
But with
str(factanal(data, factors=10)) I cannot figure out where I can find the
values for plotting.
Can you please help me in this question?
Thanks,
Martin
2011 Aug 08
0
fa (psych) output oblique.scores=TRUE vs. FALSE
Dear R-List,
I have carried out a factor analysis using fa (psych) with nfactors=2,
rotation="oblimin" and fm="pa". Now I have to report both pattern AND
structure matrix. As I have understood R-Documentation, this can be obtained
by setting the "oblique.scores" argument TRUE (structure matrix) or FALSE
(pattern matrix), respectively. However both...
2012 Aug 15
0
color-coding of biplot points for varimax rotated factors (from PCA)
...code is below. Please help.
label=data[,"Urban.Rural"]
indexU<-which(label=="U")
indexR<-which(label=="R")
collab<-rep(0,length(data[,1]))
collab[indexU]<-"Blue"
collab[indexR]<-"Green"
library(psych)
fit <- principal(mydata, nfactors = num.fac, rotate="varimax", scores = TRUE)
z1 <- sum(fit2$loadings[,1]^2) ### need to scale scores and loadings
by these factors
z2 <- sum(fit2$loadings[,2]^2)
biplot(fit$scores[,c(1,2)]/c(z1, z2), loadings(fit)[,c(1,2)]*c(z1,
z2), xlabs=rep("", length(collab)), col =...
2008 Mar 03
2
Problem with PCA
I have an exercise. With 3 kinds of yohourt a,b,c. There are 25
participatients estimate 3 norms: taste (va,vb,vc), structure (ca,cb,cc) and
price (ga,gb,gc) and give the mark from 1 to 5. I don't know how to PCA this
data. Please help me!
I attached the data file follow:
Va Vb Vc Ca Cb Cc Ga Gb Gc
4 2 4 5 5 5 4 4 2
2 2 4 3 2 5 4 5 1
2 2 1 2 3 3 3 1 4
1 1 2 2 3 3 4 3 2
3 4 4 4 3 1 2 1 2
1 1 1