Displaying 12 results from an estimated 12 matches for "intercorrel".
2013 Apr 25
1
Weighted Principle Components analysis
...I am doing Principle Componenets Analysis using "psych" package:
mypc<-principal(mydata,5,scores=TRUE)
However, I was asked to run a case-weighted PCA - using an individual
weight for each case.
I could use "corr" from "boot" package to calculate the case-weighed
intercorrelation matrix. But if I use the intercorrelation matrix as input
(instead of the raw data), I am not going to get factor scores, which I do
need to get.
Any advice?
Thank you very much!
--
Dimitri Liakhovitski
[[alternative HTML version deleted]]
2006 Aug 11
1
- factanal scores correlated?
...ctor2 Factor3
Factor1 1.000000000 0.001624383 0.002862785
Factor2 0.001624383 1.000000000 0.001956953
Factor3 0.002862785 0.001956953 1.000000000
which means that factor correlations are indeed quite low with regard to
interpretation issues, but an analysis of a larger dataset yielded
factor intercorrelations up to .10.
I guess this is an optimization issue because a lower setting of "lower"
tends to lower factor intercorrelations, but I'm still confused because
I (misleadingly?) thought that factor scores are (completely)
independent by definition?
Any hints would be greatly ap...
2011 Aug 12
1
Which Durbin-Watson is correct? (weights involved) - using durbinWatsonTest and dwtest (packages car and lmtest)
...2 packages give Durbin-Watson different
statistics. Anyone knows why?
Also, it's interesting that both of them are also different from what
SPSS spits out...
Thank you!
Dimitri
############################################
### Run the whole code below to create mysample:
intercor<-0.3 # intercorrelation among all predictors
k<-10 # number of predictors
sigma<-matrix(intercor,nrow=k,ncol=k) # matrix of intercorrelations
among predictors
diag(sigma)<-1
require(mvtnorm)
set.seed(123)
mypop<-as.data.frame(rmvnorm(n=100000, mean=rep(0,k), sigma=sigma,
method="chol"))
names...
2005 Mar 23
3
nested random effects
Hi
I am struggling with nested random effects and hope someone can help.
I have individuals (ID) who are nested within families (FAM). I want to
model an outcome variable, and take account of the intercorrelation of
individuals within each family.
I think this amounts to two random effects, one nested within the other.
How can I model this in R?
So far I have tried using the library(nlme), and then
Y~ID, random=~1|ID*FAM,
But this isn't working..
Thanks
Philip
[[alternative HTML...
2005 Sep 28
1
gee models summary
I'm running some GEE models but when I request the summary(pcb.gee) all
I get are rows and rows of intercorelations and they fill up the screen
buffer so I can not even scroll back to see what else might be in the
summary. How do I get the summary function to NOT print the
intercorrelations?
Thanks,
--
Dean Sonneborn
Programmer Analyst
Department of Public Health Sciences
University of California, Davis
(916) 734-6656
2012 May 25
1
Correlograms: using boxes and different variables on rows and columns
...variables in the columns (vars1) and another
set of variables in the rows (vars2). The reason I want to keep one set of
variables in the columns and another set of variables in the rows is because
I have many variables and am only interested in the correlations of vars1
with vars2 (and not of the intercorrelations of variables among vars1 or
among vars2). Thus, the correlogram with separate variables in the rows and
columns would be more condensed and easier to examine visually.
Can I address these issues in corrgram, or is there another package that
will allow me to do that? Thanks in advance.
--...
2007 Apr 11
1
creating a path diagram in sem
...m trying to print out the path diagram that is based on the results - but for some reason it's not working. Below is my script - but the problem is probably in my very last line:
# ANALYSIS OF ANXIETY, DEPRESSION, AND FEAR - LISREL P.31
library(sem)
# Creating the ANXIETY, DEPRESSION, AND FEAR intercorrelation matrix (KM)
KM<-matrix(
c(1,.8,.83,.2,.21,.19,.18,.18,.18,
0,1,.81,.22,.24,.18,.19,.19,.21,
0,0,1,.22,.19,.2,.2,.2,.22,
0,0,0,1,.84,.82,.22,.22,.21,
0,0,0,0,1,.84,.19,.18,.19,
0,0,0,0,0,1,.18,.18,.18,
0,0,0,0,0,0,1,.84,.82,
0,0,0,0,0,0,0,1,.81,
0,0,0,0,0,0,0,0,1), 9, 9)
# Creating the ANXI...
2008 May 24
2
Importing data in text file into R
...5 6.8 0.4 24.2
Y2 3.8 13.9 9.9 7.6 0.7 12.8
Y3 4.5 14.5 14.2 9.2 0.6 14.5
Y4 5.9 16.2 24.6 12.7 0.2 24.3
Y5 7.2 20.4 40.6 18.2 0.8 28.2
Y6 5.9 18.6 37.4 14.5 0.3 36.9
Y7 8.0 16.1 88.6 24.1 0.1 34.6
Y8 13.6 21.1 56.3 19.0 0.7 33.3
I wish to import the file into R and make certain
computations, like intercorrelation matrix. I tried
the following syntax:
# Inputting the data file (saved in text format)
df="trial.txt"
idt=read.table(df,header=T, sep="\t")
idt
# To generate intercorrelatio matrix
r = cor(idt)
r=round(r, 4)
r
The seems to have been read, but further computations
not made...
2007 Apr 09
3
sem vs. LISREL: sem fails
...be I am doing something wrong?
I have 3 latent factors (Anxiety, Depression, and Fear) - each of them has 3 observed indicators (a1, a2, a3; d1, d2, d3, and f1, f2, f3)
Below is my script in R:
! ANALYSIS OF ANXIETY, DEPRESSION, AND FEAR - LISREL P.31
! Creating the ANXIETY, DEPRESSION, AND FEAR intercorrelation matrix (KM):
KM<-matrix(
c(1,.8,.83,.2,.21,.19,.18,.18,.18,
0,1,.81,.22,.24,.18,.19,.19,.21,
0,0,1,.22,.19,.2,.2,.2,.22,
0,0,0,1,.84,.82,.22,.22,.21,
0,0,0,0,1,.84,.19,.18,.19,
0,0,0,0,0,1,.18,.18,.18,
0,0,0,0,0,0,1,.84,.82,
0,0,0,0,0,0,0,1,.81,
0,0,0,0,0,0,0,0,1), 9, 9)
! Creating the ANX...
2004 May 27
4
Sorting Data?
Hello,
Im reading through some manuals, but I cannot find my answer.
I have a file containing many data:
Vpn Code Family Age F1 F2 ... F17
1 1 M 46 1 2 ... 1
2 1 D 18 3 2 ... 4
3 2 M 50 3 3 ... 3
...
and so on.
Now I can read it by:
F = read.table("file", header=T)
but now I want to seperate the mothers (M) and daugthers (D) of the
family with all the data in all other fields.
2009 Apr 20
7
Fitting linear models
I am not sure if this is an R-users question, but since most of you here
are statisticians, I decided to give it a shot.
I am using the lm() function in R to fit a dependent variable to a set
of 3 to 5 independent variables. For this, I used the following
commands:
>model1<-lm(function=PBW~SO4+NO3+NH4)
Coefficients:
(Intercept) SO4 NO3 NH4
0.01323 0.01968
2008 Oct 24
18
Transferring results from R to MS Word
R-users
At the moment I am teaching a course on the use of R for data analysis.
Part of course requirements involves the transfer of results from R to
something that resembles the APA (American Psychological Associations)
type tables to MS Word. Until now I have used the HTML function in the
R2HTML library, with a call like this:
HTML(summary(model1), file("clipboard",