Displaying 20 results from an estimated 2706 matches for "covariances".
Did you mean:
covariance
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
2011 Apr 15
3
Monte Carlo Simulation
Hello, R friends...
I am very new to R, and I need some help. I am trying to construct a simulation for my dissertation.
I need to create 1000 datasets of 1000 subjects with the following variables...
Treatment variable - Drawn from a binomial distribution (1 run, prob=.13)
Covariate 1 - Drawn from a normal distribution (mean=100, sd=16)
Covariate 2 - Drawn from a normal distribution
2012 Oct 13
1
hep on arithmetic covariance conversion to log-covariance
Dear All,
is there a function in R that would help me convert a covariance matrix built based on arithmetic returns to a covariance matrix from log-returns?
As an example of the means and covariance from arithmetic:
mu <-c(0.094,0.006,1.337,1.046,0.263)
sigma
2012 Aug 11
3
Problem when creating matrix of values based on covariance matrix
Hi,
I want to simulate a data set with similar covariance structure as my
observed data, and have calculated a covariance matrix (dimensions
8368*8368). So far I've tried two approaches to simulating data:
rmvnorm from the mvtnorm package, and by using the Cholesky
decomposition (http://www.cerebralmastication.com/2010/09/cholesk-post-on-correlated-random-normal-generation/).
The problem is
2002 Jun 19
1
best selection of covariates (for each individual)
Dear All,
This is not strictly R related (though I would implement the solution in R;
besides, being this list so helpful for these kinds of stats questions...).
I got a "strange" request from a colleage. He has a bunch (approx. 25000)
subjects that belong to one of 12 possible classes. In addition, there are 8
covariates (factors) that can take as values either "absence"
2008 Aug 18
1
lmer syntax, matrix of (grouped) covariates?
I have a fairly large model:
> length(Y)
[1] 3051
> dim(covariates)
[1] 3051 211
All of these 211 covariates need to be nested hierarchically within a
grouping "class", of which there are 8. I have an accessory vector, "
cov2class" that specifies the mapping between covariates and the 8 classes.
Now, I understand I can break all this information up into individual
2010 Nov 18
3
Sample covariance matrix in R
Hello everyone.
I would like to find the sample covariance matrix using R.
So far I read on the wikipedia what a sample_covariance is
http://en.wikipedia.org/wiki/Sample_covariance
according to wikipedia one vector is enough to calculate the sample covariance matrix.
In R I tried cov(myvector) and I get the reply that I need to pass either two argument or one matrix with x,y values .
How can I
2006 Sep 14
1
time varying covariates
Hello,
I am trying to model an intensity function with time-varying covariates.
Before, I have successfully defined a log likelihood function for a
Power-Law Process (lambda(t)=alpha*beta*t^(beta-1)) with two paramters
and no covariates for a repairable systems with failure times (t).
This function was maximized with R optim. No problem!
But now I want to include a covariate indicating a
2008 Jan 23
2
survey: estimating a covariance matrix
Hello
Does anybody happen to know if it is possible to use the survey package to
estimate a covariance matrix from a complex survey?
I have design weights and clusters (no strata), and want to get a covariance
matrix with preferably the effective sample size or else an estimate of the
variance-covariance matrix of the covariance matrix ("asymptotic covariance
matrix"). Is this
2011 Jun 28
1
About the covariant
Hi all,I have some questions about the covariants of regression.
My target: To explore the trend of CD4 level through a period of time.
Response variable: CD4 count
Explanatory variable:time
Also, the demology information is available,such as gender,occupation,income
level...
Q1,Are these variables of demology information called covariant?
Q2,How can I correct the impact of
2004 Nov 02
3
time dependency of Cox regression
Hi,
How can I specify a Cox proportional hazards model
with a covariate which i believe its strength on
survival changes/diminishes with time? The value of
the covariate was only recorded once at the beginning
of the study for each individual (e.g. at the
diagnosis of the disease), so I do not have the time
course data of the covariate for any given individual.
For example, I want to state at the
2008 Aug 18
1
GeoR model.control - defining covariates at prediction locations
Hi,
Im using geoR and I'm trying to do some predictions, based on an external
trend.
I'm having some problems specifying my model.control, specifically how do I
define my model, and also the source of the covariate data at the prediction
locations?
I am assuming that the covariate data at the prediction locations should be
imported to a geodata object along with the prediction location
2009 Feb 10
2
Mixed ANCOVA with between-Ss covariate?
Hi all,
I have data from an experiment with 3 independent variables, 2 are
within and 1 is between. In addition to the dependent variable, I have
a covariate that is a single measure per subject. Below I provide an
example generated data set and my approach to implementing the ANCOVA.
However the output confuses me; why does the covariate only appear in
the first strata? Presumably it should
2008 Aug 22
1
Help on competing risk package cmprsk with time dependent covariate
Dear R users,
I d like to assess the effect of "treatment" covariate on a disease relapse risk with the package cmprsk.
However, the effect of this covariate on survival is time-dependent
(assessed with cox.zph): no significant effect during the first year of follow-up,
then after 1 year a favorable effect is observed on survival (step
function might be the correct way to say that ?).
2008 Dec 15
2
Using a covariance matrix as input to relaimpo package
I'm having trouble getting the relaimpo package to use a covariance matrix as
input. I'm getting an error message that reads as follows:
Error in eval(m$weights, data, parent.frame()) :
numeric 'envir' arg not of length one
I'm guessing there is something wrong with the structure of my covariance
matrix, but it looks fine to me. Pardon my R ignorance if this is an easy
2011 Dec 26
2
Problem of COX model with time dependent covariate
Hi all,
I am trying to detect association between a covariate and a disease outcome using R. This covariate shows time-varying effect, I add a time-covariate interaction item to build Cox model as follows:
COX <- coxph(as.formula("Surv(TIME,outcome)~eGFR_BASE+eGFR_BASE:TIME"),ori.data);
coef exp(coef) e(coef) z p
eGFR_BASE
2003 Jun 25
2
NLME Covariates
Dear list
In HLM, one can specify a covariate at one of the "levels". For example, if the data structure are repeated observations nested within students nested within schools, school size might be a covariate that is used at level 3, but not at the other levels. In HLM this is rather easy to do.
However, how can one specify a covariate in R for only one of the levels? I have a
2004 Oct 12
5
covariate selection?
Hello,
I am hoping someone can help me with the following multivariate issue:
I have a model consisting of about 50 covariates. I would like to
reduce this to about 5 covariate for the reduced model by combining
cofactors that are strongly correlated. Is there a package or function
that would help me with this in R? I appreciate any suggestions.
Thanks,
Ian
2011 Aug 23
4
Correlation discrepancy
Dear R list, I have one very elementary question regrading correlation between two variables.
x = c(44,46,46,47,45,43,45,44)
y = c(44,43,41,41,46,48,44,43)
> cov(x, y)
[1] -2.428571
However, if I try to calculate the covariance using the formula as
covariance = sum((x-mean(x))*(y-mean(y)))/8 # no of of paired obs. = 8
or
covariance = sum(x*y)/8-(mean(x)*mean(y))
gives
2008 Aug 26
1
Variance-covariance matrix
Dear R help forum,
I am using the function 'coxph' to obtain hazard ratios for the comparison
of a standard treatment to new treatments. This is easily obtained by
fitting the relevant model and then calling exp(coef(fit1)) say.
I now want to obtain the hazard ratio for the comparison of two non-standard
treatments.
>From a statistical point of view, this can be achieved by dividing