similar to: KLdiv produces NA. Why?

Displaying 20 results from an estimated 500 matches similar to: "KLdiv produces NA. Why?"

2010 Jul 15
1
Repeated analysis over groups / Splitting by group variable
I am performing some analysis over a large data frame and would like to conduct repeated analysis over grouped-up subsets. How can I do that? Here some example code for clarification: require("flexmix") # for Kullback-Leibler divergence n <- 23 groups <- c(1,2,3) mydata <- data.frame( sequence=c(1:n), data1=c(rnorm(n)), data2=c(rnorm(n)), group=rep(sample(groups, n,
2010 Aug 04
0
Kullback–Leibler divergence question (flexmix::KLdiv) Urgent!
Hi all, x <- cbind(rnorm(500),rnorm(500)) KLdiv(x, eps=1e-4) KLdiv(x, eps=1e-5) KLdiv(x, eps=1e-6) KLdiv(x, eps=1e-7) KLdiv(x, eps=1e-8) KLdiv(x, eps=1e-9) KLdiv(x, eps=1e-10) ... KLdiv(x, eps=1e-100) ... KLdiv(x, eps=1e-1000) When calling flexmix::KLdiv using the given code I get results with increasing value the smaller I pick the accuracy parameter 'eps' until finally reaching
2008 Oct 19
0
Kullback Leibler Divergence
Hi there, I'm trying to find the KL divergence measure between a prior and it's posterior distributions, and I'm using the KLdiv method in the flexmix package. plese see the example below: require(flexmix) x=seq(-4,4,length=100) d1=dnorm(x,0,1) d2=dunif(x,-3,3) y=cbind(d1,d2) kl=KLdiv(y) but let say, x1=seq(-5,5,length=100) d3=dunif(x1,-3,3) y1=cbind(d1,d3) kl1=KLdiv(y1) Notice
2009 Sep 22
3
problem using KLdiv - flexmix
I am receiving the following error while executing KLdiv method: kl<-KLdiv(y) Error in function (classes, fdef, mtable) : unable to find an inherited method for function "KLdiv", for signature "data.frame" the code is as follows: require(flexmix) KLdiv(y) the object y (snippet, actual object contains 188 entries) is as follows: s1p5 s2p5 1 0.6 0.8 2 0.8
2008 Sep 29
2
density estimate
Hi, I have a vector or random variables and I'm estimating the density using "bkde" function in the KernSmooth package. The out put contains two vectors (x and y), and the R documentation calls y as the density estimates, but my y-values are not exact density etstimates (since these are numbers larger than 1)! what is y here? Is it possible to get the true estimated density at each
2010 Jul 15
1
KLdiv question (data.frame)
Hi all, I wonder why KLdiv does not work with data.frames: n <- 50 mydata <- data.frame( sequence=c(1:n), data1=c(rnorm(n)), data2=c(rnorm(n)) ) # does NOT work KLdiv(mydata) # works fine dataOnly <- cbind(mydata$data1, mydata$data2, mydata$group) KLdiv(dataOnly) Any ideas? Is there a better implementation that can deal with data.frame or is there a simpler way of converting? Ralf
2010 Jul 16
1
Question about KLdiv and large datasets
Hi all, when running KL on a small data set, everything is fine: require("flexmix") n <- 20 a <- rnorm(n) b <- rnorm(n) mydata <- cbind(a,b) KLdiv(mydata) however, when this dataset increases require("flexmix") n <- 10000000 a <- rnorm(n) b <- rnorm(n) mydata <- cbind(a,b) KLdiv(mydata) KL seems to be not defined. Can somebody explain what is going
2005 May 06
1
distance between distributions
Hi, This is more of a general stat question. I am looking for a easily computable measure of a distance between two empirical distributions. Say I have two samples x and y drawn from X and Y. I want to compute a statistics rho(x,y) which is zero if X = Y and grows as X and Y become less similar. Kullback-Leibler distance is the most "official" choice, however it needs estimation of
2008 Jan 10
1
Entropy/KL-Distance question
Dear R-Users, I have the CDF of a discrete probability distribution. I now observe a change in this CDF at one point. I would like to find a new CDF such that it has the shortest Kullback-Leibler Distance to the original CDF and respects my new observation. Is there an existing package in R which will let me do this ? Google searches based on entropy revealed nothing. Kind regards, Tolga
2003 Mar 05
8
How to draw several plots in one figure?
Hey, I want to draw several plots sequently, but have to make them dispaly in one figure. So how to achieve this? Thanks. Fred
2008 Jan 24
2
Windows Vista password dialog keeps coming up
Hi, I have come to my wits end again (lately, it's a very short trip). I have been trying to connect to Samba 3.0.21b but Windows keeps throwing up the logon dialog. I'm using "Map network drive" to try to mount this share. It seems the problem is only on the Windows side since I have tested the connection through the Unix account. Both user id and password work fine.
2006 Jan 13
4
missing foreign key fields in scaffold views
Is there any reason that foreign key fields do not show in any of the scaffold views ? project table: id serial primary key, category_id integer, user_id integer, name varchar, morestuff varchar foreign key (category_id) references categories(id), foreign key (user_id) references users(id) scaffold generated views only show name, morestuff fields
2007 Aug 03
3
question about logistic models (AIC)
Een ingesloten tekst met niet-gespecificeerde tekenset is van het bericht gescrubt ... Naam: niet beschikbaar Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070803/79b6292b/attachment.pl
2009 Apr 29
12
Una pregunta de estadística (marginalmente relacionada con R)
Hola, ¿qué tal? Tengo una pregunta de esta
2009 Jul 03
1
is AIC always 100% in evaluating a model?
Hello, I'd like to say that it's clear when an independent variable can be ruled out generally speaking; on the other hand in R's AIC with bbmle, if one finds a better AIC value for a model without the given independent variable, versus the same model with, can we say that the independent variable is not likely to be significant(in the ordinary sense!)? That is, having made a lot of
2003 Mar 02
0
gss_0.8-2
A new version of gss, version 0.8-2, is on CRAN now. Numerous new functionalities have been added since my last r-announce post. An ssanova1 suite has been added since version 0.7-4. It implements low-dimensional approximations of the smoothing spline ANOVA models of the ssanova suite. ssanova1 scales much better than ssanova with large sample sizes. A gssanova1 suite is added for non
2003 Mar 02
0
gss_0.8-2
A new version of gss, version 0.8-2, is on CRAN now. Numerous new functionalities have been added since my last r-announce post. An ssanova1 suite has been added since version 0.7-4. It implements low-dimensional approximations of the smoothing spline ANOVA models of the ssanova suite. ssanova1 scales much better than ssanova with large sample sizes. A gssanova1 suite is added for non
2008 Oct 04
0
difference between sm.density() and kde2d()
Dear R users, I used sm.density function in the sm package and kde2d() in the MASS package to estimate the bivariate density. Then I calculated the Kullback leibler divergence meassure between a distribution and the each of the estimated densities, but the asnwers are different. Is there any difference between the kde2d and sm.density estimates? if there is a difference, then which is the best
2007 Jan 25
0
distribution overlap - how to quantify?
Dear R-Users, my objective is to measure the overlap/divergence of two probability density functions, p1(x) and p2(x). One could apply the chi-square test or determine the potential mixture components and then compare the respective means and sigmas. But I was rather looking for a simple measure of similarity. Therefore, I used the concept of 'intrinsic discrepancy' which is defined as:
2006 Sep 28
0
AIC in R
Dear R users, According Brockwell & Davis (1991, Section 9.3, p.304), the penalty term for computing the AIC criteria is "p+q+1" in the context of a zero-mean ARMA(p,q) time series model. They arrived at this criterion (with this particular penalty term) estimating the Kullback-Leibler discrepancy index. In practice, the user usually chooses the model whose estimated index is