Displaying 20 results from an estimated 200 matches similar to: "Adding weights to ecdf"
2013 Mar 15
1
quadprog issues---how to define the constriants
Hi list:
This is my first time to post my question on the list. Thanks for your
help.
I am solving a quadratic programming using R. Here is my question:
w = arg min 0.5*w'Mw - w'N
s. t. sum(w) = 1;
w>0
note: w is weight vector, each w_i must >=0, and the sum of w =1.
Here is my R code:
A <-matrix(c(2.26,1.26,1.12,1.12,2.27,1.13,1.12,1.13,2.2),3,3);
B <-
2010 Jan 12
1
Strange behavior when trying to piggyback off of "fitdistr"
Hello.
I am not certain even how to search the archives for this particular question, so if there is an obvious answer, please smack me with a large halibut and send me to the URLs.
I have been experimenting with fitting curves by using both maximum likelihood and maximum spacing estimation techniques. Originally, I have been writing distribution-specific functions in 'R' which work
2004 Dec 15
1
hclust and heatmap - slightly different dendrograms?
Good afternoon,
I ran heatmap and hclust on the same matrix x (strictly, I ran
heatmap(x), and hclust(dist(t(x))), and realized that the two
dendrograms were slightly different, in that the left-right
arrangement of one pair of subclusters (columns) was reversed in the
two functions (but all individual columns were grouped correctly).
Looking through the code for heatmap as a most definite
2013 Jun 22
1
metaMDS Error, Nan similar or negative values
H
ello R-experts,
I want to do ordination plots using vegan metaMDS.
I have a where many cells have zero values.
Data structure:
X[1:10,1:14]
Height.1 Height.2 Height.3 Height.4 Height.5 Height.6 Height.7
Height.8 Height.9 Height.10 Height.11 Height.12 Height.13
D30I1A 46 0 0 0 0 0 0
0 0 0 39 0 98
D30I1B
2004 Sep 07
3
heatmap help
Dear R wizards,
Hopeful someone can help me with what I believe is a pretty simple task. I
pretty new to R so some (much) of the obvious escapes me. How do I get a
distance matrix into heatmap? What do I tell distfun if what I'm trying to
map is already an ordered distance matrix? I tried >heatmap(x,
distfun=as.dist(x)) where x is the distance matrix but R gave me an error.
Thanks in
2012 Feb 28
1
Unexpected behaviour for RowSideColors in function heatmap
Hello,
I have come across some unexpected behaviour of the function heatmap in the stats package. This looks like a bug to me, but I might have misunderstood something.
When calling the function in symmetric mode, the ColSideColors are plotted correctly, but RowSideColors appear in reverse order. This code (modified from the example on the help page) demonstrates the problem:
cU <-
2008 Nov 14
0
Error in optim when i call it from a function
Dear R-users
I've got the next problem:
I've got this *function*:
fitcond=function(x,densfun,pcorte,start,...){
myfn <- function(parm,x,pcorte,...) -sum(log(dens(parm,x,pcorte,...)))
Call <- match.call(expand.dots = TRUE)
if (missing(start))
start <- NULL
dots <- names(list(...))
dots <- dots[!is.element(dots, c("upper",
2005 Oct 09
1
enter a survey design in survey2.9
Hi dears,
I expect that Mr Thomas Lumley will read this message.
I have data from a complexe stratified survey. The population is divide in 12 regions and a region consist to and urban area and rural one. there to region just with urbain area.
stratification variable is a combinaison of region and area type (urban/rural)
In rural area, subdivision are sample with probabilties proporionnal to
2011 Jul 27
0
Inversions in hierarchical clustering were they shouldn't be
Hi,
I''m using heatmap.2 to cluster my data, using the centroid method for clustering and the maximum method for calculating the distance matrix:
library("gplots")
library("RColorBrewer")
test <- matrix(c(0.96, 0.07, 0.97, 0.98, 0.50, 0.28, 0.29, 0.77,
0.08, 0.96, 0.51, 0.51, 0.14, 0.19, 0.41, 0.51),
ncol=4, byrow=TRUE)
2011 Jul 24
0
setting distance matrix and clustering methods in heatmap.2
heatmap.2 defaults to dist for calculating the distance matrix and hclust for
clustering.
Does anyone now how I can set dist to use the euclidean method and hclust to
use the centroid method?
I provided a compilable sample code bellow.
I tried: distfun = dist(method = "euclidean"),
but that doesn't work. Any ideas?
library("gplots")
library("RColorBrewer")
test
2011 Mar 18
0
keep color range constant across three persp() graphs
Hi All.
I have created two, 3-D, color graphs using persp(). Z values range from 1
to 100 on the first plot, and 0.5 to 50 on the second plot.
I would like to keep the color range constant between the two graphs, rather
than each graph showing the full range of colors.
So the first graph should go from yellow to red and the second graph should
go from yellow to orange.
Below I present a
2007 Oct 08
2
heatmap
Hi,
I am having troubles with heatmap(). I have a matrix containing pairwise
distance values and I want to plot this matrix with heatmap. I wonder
now what distfun is for. Is a distance matrix computed from my initial
matrix again and then plotted?
cheers,
andreas
2003 Jul 24
0
negative binomial
I am trying to model counts data from three different sites where the number of zeros differs significantly from one sight to another and also the counts gets bigger in site with few number of zeros considerably, meaning that the k's are different. In my model I am including about 10 covariates to start with, and I have beed attempting to fit a NEGATIVE BINOMIAL MODEL. The problem is the
2007 Jul 19
3
Error: evaluation nested too deeply when doing heatmap with binary distfunction
Hi netters,
I have a matrix X of the size (1000,100). The values are from -3 to +3.
When I tried
heatmap(X,
distfun=function(c),dist(c,method="bin"),hclustfun=function(m),hclust(m,method="average"))
I got the error message:
Error: evaluation nested too deeply: infinite recursion /
options(expressions=)?
However, if I used default parameters for distfunction:
2013 Oct 21
3
Error in heatmap
Hi,
Could you please help?
Heatmap doesn't work with:
> heatmap(as.matrix(SPIV2),na.rm = T)
Error in hclustfun(distfun(x)) :
NA/NaN/Inf in foreign function call (arg 11)
There are no 0 data rows or column
Thanks a lot
Regards
---------------------------------------
David
2007 Jan 19
1
Error in heatmap()
Hi,
I run into following error when using heatmap() for data matrix "xx".
Any help is appreciated? "xx" contains many "NA"s.
> hv <- heatmap(data.matrix(xx))
Error in hclustfun(distfun(if (symm) x else t(x))) :
NA/NaN/Inf in foreign function call (arg 11)
Thanks a lot.
Yuhong
2013 Dec 07
1
How to perform clustering without removing rows where NA is present in R
I have a data which contain some NA value in their elements.
What I want to do is to **perform clustering without removing rows**
where the NA is present.
I understand that `gower` distance measure in `daisy` allow such situation.
But why my code below doesn't work?
__BEGIN__
# plot heat map with dendogram together.
library("gplots")
library("cluster")
2014 Oct 15
2
Test K-S con distribuciones LogNormales
Hola Ruben,
Sí precisamente es lo que comentas, en matemáticas no se suele llamar
bucketización (este término se emplea más en informática) sino datos
agrupados. Pero la idea es la que tu mismo dices.
Respecto a las gráficas que has puesto, me han aclarado mucho sobre el
tema, gracias.
Si realizo lo mismo, por ejemplo con nbucket=1000 sigo obteniendo un
p-valor de 1. Es decir, que casi le
2013 Sep 06
1
Fwd: calculating dissimilarity index of islands (vegan and betapart)
Dear List,
This is Elaine, a postgraduate studying in bird distributions in East Asia.
I want to calculate Simpson dissimilarity index,
based on a presence/absence matrix of bird species in islands in East Asia.
(matrix row: 36 islands/matrix column: species ID)
(R package vegan to make NMDS and R package betapart)
In most papers using vegan for NMDS and betapart for dissimilarity
2010 Sep 18
1
Drawing Heatmap using gplots
Hi,
I am using heatmap.2 of gplots to make heatmaps of my the attached file. I
am giving my code for the same ..
library(gplots)
x=read.table("1.txt", header=TRUE)
mat=data.matrix(x)
heatmap.2(mat, col=greenred(75),
Rowv=TRUE,
Colv=TRUE,
distfun = dist,
hclustfun = hclust,
dendrogram = c("both"),
scale = c("row"),
na.rm=TRUE,
trace="none",