similar to: plotting density for truncated distribution

Displaying 20 results from an estimated 20000 matches similar to: "plotting density for truncated distribution"

2008 Aug 29
3
Density estimates in modelling framework
Hi all, Do any packages implement density estimation in a modelling framework? I want to be able to do something like: dmodel <- density(~ a + b, data = mydata) predict(dmodel, newdata) This isn't how sm or KernSmooth or base density estimation works. Are there other packages that do density estimation? Or is there some reason that this is a bad idea. Hadley -- http://had.co.nz/
2001 May 10
3
lookup function for density(...) objects
Hi folks: Is there a lookup function that returns the variate given the cumulative probability for an object returned by the density(...) function? > mydata _ as.vector(mymatrix) > mydata.density _ density(mydata) > mydata.p80 _ lookup(mydata.density, p=0.8) # is there any function to accomplish this task? Thanks. Rajiv. -------- Rajiv Prasad, Postdoctoral Research Associate,
2006 Aug 23
5
two density curves in one plot?
Hello, I was wondering if I can plot two curves I get from "density(data)" into one plot. I want to compare both. With the following commad, I just get one curve plotted: plot( density(mydata) ) Sorry for this stupid question but I could not find a solution until now... Antje
2004 Nov 13
3
density estimation: compute sum(value * probability) for given distribution
Dear R users, This is a KDE beginner's question. I have this distribution: > length(cap) [1] 200 > summary(cap) Min. 1st Qu. Median Mean 3rd Qu. Max. 459.9 802.3 991.6 1066.0 1242.0 2382.0 I need to compute the sum of the values times their probability of occurence. The graph is fine, den <- density(cap, from=min(cap), to=max(cap), give.Rkern=F)
2009 Dec 04
1
length of a density curve (or any curve)
Hello R users, When I type d <- density(MyData$x) I obtain a density object I can plot, But I wonder if there is a way to easily compute the length of the density curve ? ( I imagine I could compute the distances between the 512 equally spaced points using their x and y, but does it exist a smarter way ?) Regards, SW
2009 Apr 10
2
Stacked density plots
Hello R-community, I want to generate stacked density plots in lattice. My data consist of a numeric variable ('pid') that is measured in different individuals ('id'), which can be divided in two types ('type') and the measurements were repeated a different time points ('day'). I read in the Lattice book that this can be done using the 'flowViz'
2010 Nov 11
3
overlap histogram and density
Hi, Does anybody encounter the same problem when we overlap histogram and density     that the density line seem to shift to the right a little bit?           If you do have the same problem, what should we do to correct that?           Thank you.           par(mar=c(4,4,2,1.2),oma=c(0,0,0,0))     hist(datobs,prob=TRUE, main ="Volume of a catchment from four    
2008 Feb 27
1
ggplot2 boxplot confusion
Ultimately my aim is to get a plot of density faceted by 2 factors with a horizontal boxplot overlaid on each density plot in the grid to indicate summary stats. So I've been experimenting with creating boxplots and density plots. Here's some representative data. series = c('C2','C4','C8','C10','C15','C20') ids =
2009 Aug 22
1
plotting the graph of density with an unknown distribution
How can I plot the graph of a density of a sample with an unknown distribution? I can provide any sample size which is required. I want to have a smooth density graph of my data. New Email addresses available on Yahoo! Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. Hurry before someone else does! [[alternative HTML version deleted]]
2004 Nov 26
2
hist and truehist
Hello! Up to now I have been using hist() to display the distributions. Howevere, I noteiced strange numbers on y (vertical) axis, if I used probability = T or freq = F option. I thought it is a bug and launched the R-bug system and found some posts on that matter. Brian Ripley responded to one, that one should look at truehist() for that. Ok I can use truehist() if I want to see the ratios
2006 Feb 15
1
using kernel density estimates to infer mode of distribution
Hello... Is it possible to use "density" or another kernel density estimator to identify the mode of a distribution? When I use 'density', the resulting density plot of my data is much cleaner than the original noisy histogram, and I can clearly see the signal that I am interested in. E.g., suppose my data is actually drawn from two or more normal (or other)
2011 Jan 02
1
How to compute the density of a variable that follows a proportional error distribution
Hello, I am trying to compute the density of a variable k that is either (1) Normally distributed; (2) Log-Normally distributed; or (3) follows proportional error distribution. I tried to search R-help and the answer for normal distribution was easy to find (please see 1c). I am not sure if my formula for dlnorm is correct (please see 2c below)? I really don't know what function to use for the
2005 May 04
1
Questions about the intersection area under two kernel densities
Hi there, I am working on a project which needs the value of the interaction area under two distributions( eatimated by kernel density estimators). For example: x<-rnorm(100,0,1) y<-rnorm(100,0.2,1) density(x) # This produces the summary of dependent variable and independent variable. How can I get the individual values of variables and reform a curve to calculate the area under
2004 Mar 17
3
Persp plotting of kernel density estimate.
Dear All, I am trying to visualize the surface of a bivariate kernel density estimate. I have a vector of bivariate observations(x,y), and a function which computes the kernel density estimate z corresponding to each observation. I cannot generate the (x,y) data in the ascending order needed by persp(x,y,z). I was wondering whether there is an R version of the S function interp. Would anybody
2010 Feb 09
2
Comparing means and trends in short time-series
Dear R-list, I have a statistical problem with the comparison of short time-series, representing densities of fish in different streams. For each stream (6 in total, here below showed only part of the dataset) I have 8 years of density data, as follows: year density stream 1 2000 0.51 stream1 2 2001 0.87 stream1 3 2002 0.68 stream1 4 2003 0.56 stream1 5 2004 0.50 stream1 6
2003 Sep 09
1
Newbie question about plotting density objects
Dear List, I have an array of 6400 x 56 elements. I want to calculate the density function for each column and plot all 56 density functions in one plot. I have tried several procedures, but they all failed. What can I do? TIA Christian [[alternative HTML version deleted]]
2003 Apr 09
3
plotting the lognormal density curve
I am trying to plot a lognormal density curve on top of an existing histogram. Can anybody suggest a simple way to do this? Even if someone could just explain how to plot a regular normal density curve on top of an existing histogram, it would be a big help. Also, is there some way to search through the R-help archives other than simple browsing? Thank you so much. Your help and time is greatly
2010 Jun 25
1
what "density" is plotting ?
Hi everyone, I am confused regarding the function "density". suppose that there is a sample x of 100 data points, and plot(density(x)) gives it's pdf ? or it's more like histogram only ? thanks for any answering Carrie [[alternative HTML version deleted]]
2010 Jan 01
2
How to calculate density function of Bivariate binomial distribution
Am trying to do some study on bivariate binomial distribution. Anyone knows if there is package in R that I can use to calculate the density function of bivariate binomial distribution and to generate random samples of it. Thanks, -- View this message in context: http://n4.nabble.com/How-to-calculate-density-function-of-Bivariate-binomial-distribution-tp992002p992002.html Sent from the R help
2008 Oct 07
3
Fitting weibull, exponential and lognormal distributions to left-truncated data.
Dear All, I have two questions regarding distribution fitting. I have several datasets, all left-truncated at x=1, that I am attempting to fit distributions to (lognormal, weibull and exponential). I had been using fitdistr in the MASS package as follows: fitdistr<-(x,"weibull") However, this does not take into consideration the truncation at x=1. I read another posting in this