similar to: customizing covariance matrices

Displaying 20 results from an estimated 20000 matches similar to: "customizing covariance matrices"

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
2007 May 09
1
generalized least squares with empirical error covariance matrix
I have a bayesian hierarchical normal regression model, in which the regression coefficients are nested, which I've wrapped into one regression framework, y = X %*% beta + e . I would like to run data through the model in a filter style (kalman filterish), updating regression coefficients at each step new data can be gathered. After the first filter step, I will need to be able to feed
2007 Nov 02
1
GLS with nlme
Hello All, This is my third time attempting to post this message. I don't see it in the archive, so I'm guessing it is not getting through. If I am wrong, my apologies. I am trying to do a GLS regression, (X'V^-1X)^-1X'V^-1y, using the gls() function from the nlme package. I have the covariance matrix V. I have been searching for a way to specify the correlation structure
2005 Jan 20
3
Constructing Matrices
Dear List: I am working to construct a matrix of a particular form. For the most part, developing the matrix is simple and is built as follows: vl.mat<-matrix(c(0,0,0,0,0,64,0,0,0,0,64,0,0,0,0,64),nc=4) Now to expand this matrix to be block-diagonal, I do the following: sample.size <- 100 # number of individual students I<- diag(sample.size) bd.mat<-kronecker(I,vl.mat) This
2007 Jun 25
3
Bug in getVarCov.gls method (PR#9752)
Hello, I am using R2.5 under Windows. Looks like the following statement vars <- (obj$sigma^2)*vw in getVarCov.gls method (nlme package) needs to be replaced with: vars <- (obj$sigma*vw)^2 With best regards Andrzej Galecki Douglas Bates wrote: >I'm not sure when the getVarCov.gls method was written or by whom. To >tell the truth I'm not really sure what
2011 Jun 02
4
generating random covariance matrices (with a uniform distribution of correlations)
List members, Via searches I've seen similar discussion of this topic but have not seen resolution of the particular issue I am experiencing. If my search on this topic failed, I apologize for the redundancy. I am attempting to generate random covariance matrices but would like the corresponding correlations to be uniformly distributed between -1 and 1. The approach I have been using is:
2007 May 18
0
gls() error
Hi All How can I fit a repeated measures analysis using gls? I want to start with a unstructured correlation structure, as if the the measures at the occations are not longitudinal (no AR) but plainly multivariate (corSymm). My data (ignore the prox_pup and gender, occ means occasion): > head(dta,12) teacher occ prox_self prox_pup gender 1 1 0 0.76 0.41 1 2
2007 May 11
1
Create an AR(1) covariance matrix
Hi All. I need to create a first-order autoregressive covariance matrix (AR(1)) for a longitudinal mixed-model simulation. I can do this using nested "for" loops but I'm trying to improve my R coding proficiency and am curious how it might be done in a more elegant manner. To be clear, if there are 5 time points then the AR(1) matrix is 5x5 where the diagonal is a constant
2011 Oct 19
1
Sparse covariance estimation (via glasso) shrinking to a "nonzero" constant
I've only been using R on and off for 9 months and started using the glasso package for sparse covariance estimation. I know the concept is to shrink some of the elements of the covariance matrix to zero. However, say I have a dataset that I know has some underlying "baseline" covariance/correlation (say, a value of 0.3), how can I change or incorporate that into to the
2006 Feb 22
1
var-covar matrices comparison
> Date: Mon, 20 Feb 2006 16:43:55 -0600 > From: Aldi Kraja <aldi at wustl.edu> > > Hi, > Using package gclus in R, I have created some graphs that show the > trends within subgroups of data and correlations among 9 variables (v1-v9). > Being interested for more details on these data I have produced also the > var-covar matrices. > Question: From a pair of two
2004 May 24
0
coxph covariance matrix
Hi, when calculating the Cox model for a factor with n levels (using treatment contrasts), i noticed that the off diagonal elements of the estimated covariance matrix are always nearly (but not exactly) equal. On the one hand, this is plausible to me: If i could obtain estimates x_i, 1<=i<=n, for the log hazard ratios relative to the baseline hazard, then of course the off diagonal
2014 Jun 19
1
Restrict a SVAR A-Model on Matrix A and Variance-Covariance-Matrix
Hello folks! I'm using R-Package {vars} and I'm trying to estimate an A-Model. I have serious problems regarding the restrictions. 1) My A-Matrix needs (!) to have the following form: # 1 NA NA NA # 0 1 NA NA # 0 0 1 NA # 0 0 0 1 That is done in R by: A_Matrix <- diag(4) # main diagonal = 4 restrictions A_Matrix [1, 2] <- NA # A_Matrix [1, 3] <- NA #
2003 Apr 20
1
covariance = diagonal + F'F
Dear R-Helpers, I have a n*m data matrix (n is the number of observations) and I want to estimate its covariance matrix as a sum of a diagonal matrix and a low-rank matrix F'F, where F is p*m matrix (sometimes called "factors"), p<<m, and F' is F transpose. My questions are: 1. Given the number of factors p is there an R function that finds the best F? 2. How to select
2005 May 17
0
problem with gls : combining weights and correlation structure
Dear R-users, I hope you will have time to read me and I will try to be brief. I am also sorry for my poor english. I used gls function from the package nlme to correct two types of bias in my database. At first, because my replicates are spatially aggregated, I would like to fit a corStruct function like corLin, corSpher, corRatio, corExp or corGaus in my gls model, and simultaneously,
2006 Oct 27
2
Multivariate regression
Hi, Suppose I have a multivariate response Y (n x k) obtained at a set of predictors X (n x p). I would like to perform a linear regression taking into consideration the covariance structure of Y within each unit - this would be represented by a specified matrix V (k x k), assumed to be the same across units. How do I use "lm" to do this? One approach that I was thinking of
2007 Jun 16
0
How to specify covariance matrix in copula?
I want to use copula package in R to generate random vector of multivariate F distribution with a pre-specified diagonal covariance matrix, say, diag(2, 3, 0, 0, 0). Can someone tell me how I can specify the diagonal covariance matrix in the copula function "mvdc"? Thank you very much.
2004 Jun 07
2
MCLUST Covariance Parameterization.
Hello all (especially MCLUS users). I'm trying to make use of the MCLUST package by C. Fraley and A. Raftery. My problem is trying to figure out how the (model) identifier (e.g, EII, VII, VVI, etc.) relates to the covariance matrix. The parameterization of the covariance matrix makes use of the method of decomposition in Banfield and Rraftery (1993) and Fraley and Raftery (2002) where
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
2018 Jan 31
1
What is the default covariance structure in the glmmPQL function (MASS package)?
Hello, currently I am trying to fit a generalized linear mixed model using the glmmPQL function in the MASS package. I am working with the data provided by the book from Heck, Thomas and Tabata (2012) - https://www.routledge.com/Multilevel-Modeling-of-Categorical-Outcomes-Using-IBM-SPSS/Heck-Thomas-Tabata/p/book/9781848729568 I was wondering, which variance-covariance structure the glmmPQL
2008 Jun 26
2
constructing arbitrary (positive definite) covariance matrix
Dear list, I am trying to use the 'mvrnorm' function from the MASS package for simulating multivariate Gaussian data with given covariance matrix. The diagonal elements of my covariance matrix should be the same, i.e., all variables have the same marginal variance. Also all correlations between all pair of variables should be identical, but could be any value in [-1,1]. The problem I am