similar to: Creating covariance matrices for simple and complex factor structure

Displaying 20 results from an estimated 7000 matches similar to: "Creating covariance matrices for simple and complex factor structure"

2008 Dec 26
3
Simulating dataset using Parallel Latent CTT model?
I am trying to simulate a dataset using Parallel Latent CTT model and this is what i have done so far: (START) #Importing psych library for all the simulation related functions library(psych) # Settting the working directory path to C:/NCME path="C:/NCME" setwd(path) #Using the function to generate the data GenData <- congeneric.sim(N=500, loads =
2009 Jan 10
2
Print specific matrix value???
Hello All, I'm trying to print specific row and column for Observed_Scores matrix, however, when I execute the command "Observed_Scores[1,1]", I get the message "Error in Observed_Scores[1, 1] : incorrect number of dimensions". Could you please help and let me know where is the mistake? Here is my program: library(ltm) library(psych) # Settting the working directory
2009 Mar 22
1
Converting Matrix into List - problem (urgent)
Hi, I'm trying to convert Matrix into a list format and have written the following code: path = ("C:/2PL_Alpha_C_2PL_Loading") setwd(path) getwd() congeneric = matrix(rep(NA,36),nrow=6,ncol=6) conFirst = matrix(rep(NA,36),nrow=6,ncol=6) conFirstTwenty = rep(NA, 20) k = 1 #Reading all the Alpha and Congeneric 2PL values into variables alpha <-
2009 Jan 28
1
stack data sets
Hi All, I'm generating 10 different data sets with 1 and 0 in a matrix form and writing the output in separate files. Now I need to stack all these data sets in one vector and I know that stack only operates on list or data frame however I got these data sets by converting list to a matrix so can't go backwards now. Is there a way i can still use Stack? Please see the program:
2009 Jul 12
0
Specifying a more complex covariance matrix in lme or lmer
Hi all, I've searched threads and read up on some ways of doing this but I'm having a hard time to get it to work. Here's my basic problem. I have the following linear mixed model y = Xb+Zu+e where u~N(0,s^2*K) where K is a matrix. I read a thread that basically suggested to decompose Zu into ZPD^(1/2) D^(-1/2)P'u so that (D^(-1/2)P'u)~N(0,s'^2I) but I'm not sure
2007 Sep 26
1
Accessing the fixed- and random-effects variance-covariance matrices of an nlme model
I would appreciate confirmation that the function vcov(model.nlme) gives the var-cov matrix of the fixed effects in an nlme model. Presumably the random-effects var-cov matrix is given by cov(ranef (model.nlme)? Rob Forsyth
2005 Mar 23
0
how to test for equality of covariance Matrices in lda
when using the two-group discriminant analysis,we need to test for equality of covariance Matrices in lda.as whenm we formed our estimate of the within-group covariance matrix by pooling across groups,we implicitly assumed that the covariance structure was the same across groups.so it seems important the test the equality.but i can not find function in R to do these.
2007 Jan 27
0
customizing covariance matrices
Hello R-users, Does anyone know how to customize a corStruct object to be used in gls? I would either like to create the covariance matrix from scratch, or alter the diagonal elements of an existing corStruct object and pass that to gls. Any ideas would be appreciated!
2008 Sep 27
1
Using "by" to create individual variance-covariance matrices
Hello R list subscribers, I am trying to use the "by" command to create line-specific variance covariance matrices (where "x" is the original data matrix): by(x, x$line, function(d) { d.clean <- d[,-1]}) write.table(d.clean$line[1,1], sep = ",", file = "covariances.csv", col.names = FALSE, row.names = FALSE, append = TRUE) write.table("", sep
2005 May 15
0
testing equality of covariance matrices
Dear R-mailers, I would like to test for equality of population covariance matrices. But I can't find a R tool to do so. I saw, that other people had the same question, but I could not find an answer to it, I would appreciate to know the missed link. Thank you, b.w. K. Steinmann
2002 Oct 23
0
Obtaining covariance matrices for kmeans output clusters
I am having trouble getting a covariance matrix for each cluster which is output by kmeans(). My input looks like: > imagedat <- read.table("table", header=TRUE) > imagedat Red Green Blue 0_0 5 7 8 1_0 5 5 18 2_0 7 8 49 3_0 22 8 76 4_0 54 10 67 5_0 50 9 28 6_0 18 10 15 7_0 9 7 6
2003 Apr 04
0
nlme and variance-covariance matrices.
-- Dear R users, I have data on around 2000 birds from 3 generations for which I know an individual's pedigree (i.e. the relationship it shares with other individuals e.g brother, uncle, mother) and also a pedigree based on foster-families, because half broods were removed from their nest of origin and placed in a foster parent's nest. From this I want to model two types of random
2005 Sep 18
0
How to test homogeneity of covariance matrices?
Dear Group Members, Forgive me if I am a little bit out of subject. I am looking for a good way to test the homogeneity of two variance-covariance matrices using R, prior to a Hotelling T test. Youll probably tell me that it is better to use a robust version of T, but I have no precise idea of the statistical behaviour of my variables, because they are parameters from the harmonics of
2010 Jan 22
1
Equality between covariance matrices?
I have conducted a discriminant function analysis with lda() in the MASS Package, and I am interested in testing that the covariance matrices of the groups are equal. Does anybody have any suggestions on how I could test for equality between covariance matrices? Any help would be great. Thank you in advance. Cheers -Rob -- [[alternative HTML version deleted]]
2010 Nov 15
1
Non-positive definite cross-covariance matrices
I am creating covariance matrices from sets of points, and I am having frequent problems where I create matrices that are non-positive definite. I've started using the corpcor package, which was specifically designed to address these types of problems. It has solved many of my problems, but I still have one left. One of the matrices I need to calculate is a cross-covariance matrix. In other
2011 Dec 08
2
Relationship between covariance and inverse covariance matrices
Hi, I've been trying to figure out a special set of covariance matrices that causes some symmetric zero elements in the inverse covariance matrix but am having trouble figuring out if that is possible. Say, for example, matrix a is a 4x4 covariance matrix with equal variance and zero covariance elements, i.e. [,1] [,2] [,3] [,4] [1,] 4 0 0 0 [2,] 0 4
2010 Mar 27
3
Calculate variance/covariance with complex numbers
Anybody knows what functions can be used to calculate variance/covariance with complex numbers? var and cov don't seem to work: > a 1 V1 0.00810014+0.00169366i V2 0.00813054+0.00158251i V3 0.00805489+0.00163295i V4 0.00809141+0.00159533i V5 0.00813976+0.00161850i > var(a) 1 1 1.141556e-09 Warning message: In var(a) : imaginary parts discarded in
2011 Aug 06
0
ridge regression - covariance matrices of ridge coefficients
For an application of ridge regression, I need to get the covariance matrices of the estimated regression coefficients in addition to the coefficients for all values of the ridge contstant, lambda. I've studied the code in MASS:::lm.ridge, but don't see how to do this because the code is vectorized using one svd calculation. The relevant lines from lm.ridge, using X, Y are:
2006 Jan 13
1
Variance-covariance by factor
Dear all, I have a data frame with one factor and four numeric variables and wish to obtain the var-cor matrix separately by factor. I tried by() and sapply() but getting nowhere. I understand this can be done by subsetting the dataframe, but there should have some sleek ways of doing it. Here is a simulated dataframe; s <- rep(c("A","B","C"), c(25,22,18)) d
2008 Aug 11
0
Covariance structure determination when lmer has false convergence.
I have fit a model with a more complex covariance structure, but the fit reports a false convergence. I have read from past posts that this can be an indication of over-specification. I went ahead and fit a model with a simpler covariance structure. It doesn't seem like I can compare the two likelihoods or the AIC or BIC to compare the two model since the one model had false convergence.