Displaying 20 results from an estimated 100 matches similar to: "cov2cor exp"
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
Dear all,
I tried running the following syntax but it keeps running for about 4 hours
and then i got the following errors:
Error in if (is.na(f0$objective)) { : argument is of length zero
In addition: Warning message:
In is.na(f0$objective) :
is.na() applied to non-(list or vector) of type 'NULL'
Here is the syntax itself:
library('nloptr')
library('pracma')
#
2004 May 27
1
modes of objects
Hi R People:
I am looking for some objects:
>objects(pat="f")
[1] "dufus" "f" "f1" "fake.df" "ff" "fm1" "one.df"
"one1.df" "x.df" "xf"
>mode(objects(pat="f"))
[1] "character"
>
I would like to determine the mode of these objects.
2006 Feb 21
3
Compute a correlation matrix from an existing covariance matrix
Dear All,
I am wondering if there is an R function to convert a covariance matrix to a correlation matrix. I have a covariance matrix sigma and I want to compute the corresponding correlation matrix R from sigma.
Thank you very much,
Bernard
---------------------------------
[[alternative HTML version deleted]]
2009 Jun 25
2
Error: system is computationally singular: reciprocal condition number
I get this error while computing partial correlation.
*Error in solve.default(Szz) :
system is computationally singular: reciprocal condition number =
4.90109e-18*
Why is it?Can anyone give me some idea ,how do i get rid it it?
This is the function i use for calculating partial correlation.
pcor.mat <- function(x,y,z,method="p",na.rm=T){
x <- c(x)
y <- c(y)
2008 May 19
2
Converting variance covariance matrix to correlation matrix
Suppose I have a Variance-covariance matrix A. Is there any fast way to
calculate correlation matrix from 'A' and vice-versa without emplying any
'for' loop?
[[alternative HTML version deleted]]
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:
2011 Jul 28
2
Help with modFit of FME package
Dear R users,
I'm trying to fit a set an ODE to an experimental time series. In the attachment you find the R code I wrote using modFit and modCost of FME package and the file of the time series.
When I run summary(Fit) I obtain this error message, and the values of the parameters are equal to the initial guesses I gave to them.
The problem is not due to the fact that I have only one
2012 Mar 15
6
Generation of correlated variables
Hi everyone.
Based on a dependent variable (y), I'm trying to generate some independent
variables with a specified correlation. For this there's no problems.
However, I would like that have all my "regressors" to be orthogonal (i.e.
no correlation among them.
For example,
y = x1 + x2 + x3 where the correlation between y x1 = 0.7, x2 = 0.4 and x3 =
0.8. However, x1, x2 and x3
2009 Jun 28
1
ERROR: system is computationally singular: reciprocal condition number = 4.90109e-18
Hi All,
This is my R-version information:---
> version
_
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
status
major 2
minor 7.1
year 2008
month 06
day 23
svn rev 45970
language R
version.string R version 2.7.1 (2008-06-23)
While calculating partial
2007 Jul 30
3
Constructing correlation matrices
Greetings,
I have a seemingly simple task which I have not been able to solve today and I checked all of the help archives on this and have been unable to find anything useful. I want to construct a symmetric matrix of arbtriray size w/o using loops. The following I thought would do it:
p <- 6
Rmat <- diag(p)
dat.cor <- rnorm(p*(p-1)/2)
Rmat[outer(1:p, 1:p, "<")] <-
2011 Aug 04
1
use of modMCMC
Dear all,
I used modFit of the package FME to fit a set of ODE to a ste of eperiemntal
data.
The summary of this fit give me the following error
> summary(Fit)
Residual standard error: 984.1 on 452 degrees of freedom
Error in cov2cor(x$cov.unscaled) : 'V' is not a square numeric matrix
In addition: Warning message:
In summary.modFit(Fit) : Cannot estimate covariance; system is
2004 Oct 22
1
cor, cov, method "pairwise.complete.obs"
Hi UseRs,
I don't want to die beeing idiot...
I dont understand the different results between:
cor() and cov2cov(cov()).
See this little example:
> x=matrix(c(0.5,0.2,0.3,0.1,0.4,NA,0.7,0.2,0.6,0.1,0.4,0.9),ncol=3)
> cov2cor(cov(x,use="pairwise.complete.obs"))
[,1] [,2] [,3]
[1,] 1.0000000 0.4653400 -0.1159542
[2,] 0.4653400 1.0000000
2009 Mar 09
2
path analysis (misspecification?)
hi,
I have following data and code;
cov <-
c
(1.670028
,-1.197685
,-2.931445,-1.197685,1.765646,3.883839,-2.931445,3.883839,12.050816)
cov.matrix <- matrix(cov, 3, 3, dimnames=list(c("y1","x1","x2"),
c("y1","x1","x2")))
path.model <- specify.model()
x1 -> y1, x1-y1
x2 <-> x1, x2-x1
x2 <->
2011 Mar 04
2
overleap an iteration within a for-loop when error message produced
Dear R-list member,
I'm using the function pmnorm() (-->library(mnormt)) within a for-loop.
Certain parameter values leads to an error message:
"(In sqrt(diag(S)) : NaNs produced, In sqrt(1/diag(V)) : NaNs
produced, In cov2cor(S) : diag(.) had 0 or NA entries; non-finite result
is doubtful)"
obviously because "NaNs" were produced.
Is it possible to tell R that it
2008 Jun 14
1
How to see data for a package built under Windows
I have followed the instructions on how to build a Windows package and
everything seems to work EXCEPT that I can't see the data files that I have
loaded into the data directory. I have placed the appropriate data in the
data directory (as in the instructions). There are 3 data sets, which I can
see when I use the command in R. Details below. I have searched everywhere
to try to fix this, but
2008 Nov 30
1
using survey weights for correlations
Dear list,
I have a data file which includes, alongside various variables representing questionnaire scores, a variable for survey weights computed as the number of observations in the sample drawn from that group divided by the number of observations in the population in the group. I need to calculate a covariance matrix of the questionnaire scores for use in sem. How do I apply the weights?
2010 Oct 18
1
Looking for covariance function -OR- how do you search
Hello everyone.,
I am looking for a covariance function this not the first time I have this type
of problem (to find which function does something). I try in google with "R cran
covariance function" but usually this ends with different results that do not
help me that much.
Could you please try to advice me how to search for what function implements the
functionality you want.
2011 Aug 05
1
Simulacion matrices de varianza-covarianza
Hola!
Para simular matrices de datos normales multivariados con la sentencia
rmvnorm (dentro del paquete mvtnorm) se necesita, entre otras cosas, el
número de vectores a simular, el vector de parámetros-medias correspondiente
a cada variable y su respectiva matriz de Varianza-Covarianza. En este
último punto, tengo problemas.
En lugar de ingresar una matriz sigma creada por mi, necesito simular
2012 Sep 16
1
trying to obtain same nls parameters as in example
Dear R-users;
I'm working with a a dataset that was previously used to fit a
nonlinear model of the form:
Y ~ a * (1 + b * log(1 - c * X^d))
The parameters published elsewhere are:
a = 1.758863, b = .217217, c = .99031, and d = .054589
However, there is no way I can replicate this result. I've tried
several options (including SAS) w/o success.
The data is:
X <-
2008 May 28
2
Tukey HSD (or other post hoc tests) following repeated measures ANOVA
Hi everyone,
I am fairly new to R, and I am aware that others have had this
problem before, but I have failed to solve the problem from previous
replies I found in the archives.
As this is such a standard procedure in psychological science, there
must be an elegant solution to this...I think.
I would much appreciate a solution that even I could understand... ;-)
Now, I want to calculate a