Displaying 20 results from an estimated 10000 matches similar to: "Null values In R."
2008 Nov 17
1
HELP ON SCALING GENE EXPRESSION DATA TO -1,0,1
Hello R-Community,
I am a rookie in R and I am fascinated with the power of bio computing
by R. I am analysing gene expression data from Real time PCR. I have
used absolute gene quantitation to measure gene copy number in all my
transcripts. All my data has been normalised them to a housekeeping
gene, which is constitutive expressed.
My problem is as follows.
After normalising some of the genes
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
2008 Jan 02
2
strange behavior of cor() with pairwise.complete.obs
Hi all, 
I'm not quite sure if this is a feature or a bug or if I just fail to understand
the documentation: 
If I use cor() with pairwise.complete.obs and method=pearson, the result is a
scalar: 
->cor(c(1,2,3),c(3,4,6),use="pairwise.complete.obs",method="pearson")
[1] 0.9819805
The documentation says that 
" '"pairwise.complete.obs"' only
2008 Feb 27
4
Error in cor.default(x1, x2) : missing observations in cov/cor
Hello,
I'm trying to do cor(x1,x2) and I get the following error:
Error in cor.default(x1, x2) : missing observations in cov/cor
A few things:
1.  I've used cor() many times and have never encountered this error.
2.  length(x1) = length(x2)
3.  is.numeric(x1) = is.numeric(x2) = TRUE
4.  which(is.na(x1))  = which(is.na(x2)) = integer(0)   {the same goes for
is.nan()}
5.  I also try
2005 Mar 16
2
(no subject)
Dear R
I'm trying to do a correlation matrix for some variables I have.
Unfortunately there are some NA entries for some of the variables 
I tried the following
cor(sleep[c("logbw", "logbrw", "SlowSleep", "ParaSleep", "loglife",
"loggest")])
but it told me
Error in cor(sleep[c("logbw", "logbrw",
2010 Jun 09
1
bug? in stats::cor for use=complete.obs with NAs
Arrrrr,
I think I've found a bug in the behavior of the stats::cor function when
NAs are present, but in case I'm missing something, could you look over
this example and let me know what you think:
> a = c(1,3,NA,1,2)
> b = c(1,2,1,1,4)
> cor(a,b,method="spearman", use="complete.obs")
[1] 0.8164966
> cor(a,b,method="spearman",
2005 Feb 13
1
Bug in cor function (PR#7689)
I can't hardly accept the result of  cor function with 
pairwize.colplete.obs or complete.obs
insert print statements in cor function,
+     if (method != "pearson") {
  +         Rank <- function(u) if (is.matrix(u))
  +             apply(u, 2, rank, na.last = "keep")
  +         else rank(u, na.last = "keep")
  +         x <- Rank(x)
  +        
2000 Jan 31
1
Feature requests for princomp(.) : Allow cor() specifications
(all in subject).
If I want to do a PC analysis in a situation with missing data,
I may want to have same flexibility as with "cor(.)",
e.g., I may want
      princomp(x, ...,  use.obs = "pairwise.complete")
Actually, I may want even more flexibility.
Currently,
	princomp(.) 
has
    if (cor) 
        cv <- get("cor", envir = .GlobalEnv)(z)
    else cv <-
2008 Jun 23
2
Correlation Help
Hi,
I have recently been using the R program and encountered a recurring problem. I have been trying calculate the correlation of a 16 column table. Everytime I type in cor(test), where test is data that I uploaded into R using the read.table function, I get an error:
Error in cor(test) : missing observations in cov/cor
In addition: Warning message:
In cor(test) : NAs introduced by coercion 	
2011 Jan 31
2
computing var-covar matrix with much missing data
Is there an R function for computing a variance-covariance matrix that 
guarantees that it will have no negative eigenvalues?  In my case, there 
is a *lot* of missing data, especially for a subset of variables.  I think 
my tactic will be to compute cor(x, use="pairwise.complete.obs") and then 
pre- and post-multiply by a diagonal matrix of standard deviations that 
were computed based
2003 Nov 19
1
Specifying arguements in user defined functions
Dear R subscribees,
First, I am new to R and I apologize if the question is naive.  I am trying to 
find out where arguments specifications
can be found.   For example, the code below (at the very bottom of
this email) contains the argument 'digits' in the function 'lin' which 
printout my output to the 3rd decimal place.  Somebody showed me the 
'digits' argument, but did
2013 Mar 20
2
Dealing with missing values in princomp (package "psych")
Hello!
I am running principle components analysis using princomp function in
pacakge psych.
mypc <- princomp(mydataforpc, cor=TRUE)
Question: I'd like to use pairwise deletion of missing cases when
correlations are calculated. I.e., I'd like to have a correlation between
any 2 variables to be based on all cases that have valid values on both
variables.
What should my na.action be in
2008 Oct 30
1
A question about pairs()
Greetings R users,
I am an R graphics newbie trying to produce a custom trellis plot using 
pairs() with R 2.7.2.
I have spatial data on which I run a geographically weighted regression 
(gwr, using the -spgwr- package). I want to check the gwr coefficients 
for multicollinearity and spatial association, following Wheeler and 
Tiefelsdorf (2005), and I would like to summarize the results of this
2009 Jun 02
2
variance does not equal serial covariance of lag zero?
Dear all,
Does this make any sense:
var() = cov() != acf(lag.max=0, type="covariance")?
I have daily data of IBM for May 2005, and I'm using the logarithmic return:
> ibm200505$LRAdj.Close
 [1]         NA  0.0203152  0.0005508 -0.0148397 -0.0025182  0.0092025
-0.0013889
 [8]  0.0098196 -0.0103757 -0.0274917  0.0005716 -0.0159842 -0.0074306
 0.0091710
[15]  0.0002898  0.0226306 
2013 Jan 23
2
CFA with lavaan or with SEM
Hi
Sorry for the rather long message.
I am trying to use the cfa command in the lavaan package to run a CFA however I am unsure over a couple of issues.
I have @25 dichotomous variables, 300 observations and an EFA on a training dataset suggests a 3 factor model.
After defining the model I use the command
fit.dat <- cfa(model.1, data=my.dat, std.lv = T, estimator="WLSMV",
2001 Nov 01
1
cor.test for a correlation matrix
Is there a simple way to run cor.test on for a matrix of correlations?
Of course, cor on a data frame produces a correlation matrix, but cor.test will only take two variables at a time.  Is there a way to get behavior similar to that of cor with cor.test?
I suppose the programming alternative would be to run two for loops with the number of items and cor test embedded accessing the columns of
2008 May 16
1
var/sd and NAs in R2.7.0
Hello all,
I just upgraded to R 2.7.0 and found that the behavior of 'var' and 'sd'
have changed in the presence NAs (this wasn't explicit in the NEWS file,
though I see it probably has to do with the change for cor/cov). Anyway,
I just want to make sure that it was intentional to produce an error
when there was all NAs and na.rm=TRUE, rather than returning an NA (like
R
2005 Oct 18
1
Defining range of x and y axis in pairs()
Hi,
I have a problem to define the range of x and y axis in pairs() for my
scatterplots. In low-level plots I can specify that by providing xlim
and ylim. This also works for pairs() even if warnings tell me that it
doesn't (see below). 
But if I add upper.panel and/or lower.panel it doesn't work - I get an
error message saying that there's an error in "upper.panel
2004 Apr 09
6
Incorrect handling of NA's in cor() (PR#6750)
Full_Name: Marek Ancukiewicz
Version: 1.8.1
OS: Linux
Submission from: (NULL) (132.183.12.87)
Function cor() incorrectly handles missing observation with method="spearman":
> x <- c(1,2,3,NA,5,6)
> y <- c(4,NA,2,5,1,3)
> cor(x,y,use="complete.obs",method="s")
[1] -0.1428571
>
2007 Sep 21
3
Estimate correlation with bootstrap
Hello.
I would like to estimate the correlation coefficient
from two samples with Bootstrapping using the
R-function sample().
The problem is, that I have to sample pairwise. For
example if I have got two time series and I draw from
the first series the value from 1912 I need the value
from 1912 from the second sample, too.
Example:
Imagine that a and b are two time series with returns
for