similar to: density calculation

Displaying 20 results from an estimated 6000 matches similar to: "density calculation"

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
2010 May 11
0
[Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10]
Is it the tick labels that you want to change? -----Original Message----- From: "Elisabeth Bjerke Rastad" <ebr024 at post.uit.no> To: "r-help at r-project.org" <r-help at r-project.org> Sent: 5/10/10 11:20 AM Subject: [R] [Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10] Hello! Thank you for answering! What I am
2010 May 10
2
[Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10]
Hello! Thank you for answering! What I am trying to do is to plot my raw values (biomass of different species) on a logaritmic y-axis with the base of e. When I type "log="y"", the axis transforms into a logaritmic axis with the base of 10. Best regards, Elisabeth > Dear Elisabeth, > > I'm not sure if I have understood your question -- are you trying > to
2008 Feb 05
2
two densities with same stepsize
Hi there, I have two series of data. plotting the density function of both gives me an idea about the difference of the data. But I would like to quantify the difference I see. a <- rnorm(100) b <- rnorm(100) da <- density(a) db <- density(b) The problem is that da$x and db$x are different and so I have difficulties to compare them... Is there any way to force the density
2011 Feb 11
2
fitdistr question
Hello, I tried to fit a poisson distribution but looking at the function fitdistr() it does not optimize lambda but simply estimates the mean of the data and returns it as lambda. I'm a bit confused because I was expecting an optimization of this parameter to gain a good fit... If I would use mle() of stats4 package or mle2() of bbmle package, I would have to write the function by myself
2011 Feb 21
2
Console output
Hi there, I though there has been a possibility to force the output on the console with one element per line. Instead of this: > 1:10 [1] 1 2 3 4 5 6 7 8 9 10 something like this > 1:10 [1] 1 [2] 2 [3] 3 [4] 4 [5] 5 [6] 6 [7] 7 [8] 8 [9] 9 [10] 10 Can anybody help? Antje
2010 May 09
1
Plotting log-axis with the exponential base to a plot wi
Hello Ted! Thank you a lot for your reply!!! I will try to explain again; what I want is a logarithmic scaled y-axis with the base of e (not 10). And the values I would like to use in the plot are the raw values (not transformed in any way). Do you still think that the base of log does not matter in this case (wheather it is e or 10 as a base)? Elisabeth > On 09-May-10 18:10:27, Elisabeth
2007 Nov 21
1
fitting a line to a logaritmic plot
Hi, I have processed measurements of a rough surface to a heigh-height correlation plot. What the meaning of this exactly is, is not important. Only that it is a plot that had two (almost ) linear parts when plotted on a logaritmic scale. In this plot, I want to draw the best fitting lines for these linear parts but I just can't get it done. It is easy when the scales are linear but as you
2008 Dec 05
6
levels update
Hello, I hope this question is not too stupid. I would like to know how to update levels after subsetting data from a data.frame. df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4)) names(df) <- c("X1","X2","X3") my.sub <- subset(df, X1 == "a" | X1 == "b")
2006 Nov 01
4
extract values from a vector
Hello, I'm looking for a solution for the following problem: I have two vectors V1 <- c("apple","honey","milk","bread","butter") V2 <- c("bread","milk") now, I would like to know for each element in V1 if it's equal to one of the elements in V2 I could do: which(V1 == V2[1] | V1 == V2[2]) but what if I
2008 Dec 02
3
boxplot via plot command
Hi folks, I've just discovered that the following code leads to boxplot (surprisingly to me). Can anybody explain to me why? Is this documented somewhere? I've never consider this option before. x <- rnorm(300) l <- c(rep("label1",100), rep("label2",50), rep("label3",150)) df <- data.frame(as.factor(l), x) plot(df) Thank you! Antje
2009 May 04
4
levelplot question
Hi there, I have a question concerning the behaviour of the colouring with levelplot. (I hope, I manage to explain) If I give the parameters "at" and "col.regions" like this: at <- c(1,2,3,4,5,6) col.regions <- c("blue","blue","blue","yellow","yellow","yellow") Which color would have the value 3.5? I would
2007 Oct 30
2
flexible processing
Hello, unfortunately, I don't know a better subject. I would like to be very flexible in how to process my data. Assume the following dataset: par1 <- seq(0,1,length.out = 100) par2 <- seq(1,100) fac1 <- factor(rep(c("group1", "group2"), each = 50)) fac2 <- factor(rep(c("group3", "group4", "group5", "group6"), each =
2011 Feb 07
2
question mle again
A few day ago, I was looking for an answer to my question but didn't get one. Anybody who can help now? Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and prob). But within the ll() function I have to judge if the current parameter-set gives a nice
2004 Nov 17
1
R: log-normal distribution and shapiro test
Hi, from what you're writing: "The logaritmic transformation "shapiro.test(log10(y))" says: W=0.9773, p-value= 2.512e-05." it seems the log-values are not distributed normally and so original data are not distributed like a log-normal: the p-value is extremally small! Other tests for normality are available in package: nortest compare the log-transformation of your ecdf
2011 Feb 01
1
mle question
Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and prob). But within the ll() function I have to judge if the current parameter-set gives a nice fit or not. So I have to apply them to observation data. But how does the method know about my observed
2010 May 09
3
Plotting log-axis with the exponential base to a plot with the default logarithm base 10
Hello! I have a problem which I have tried to solve for several days now.. I have plottet a lineplot.CI in the library "sciplot", and I am trying to plot it with a logaritmic y-axis (with exponential base). The problem is that; when I type "log "y"", the axis transforms into the logaritmic of base 10. I wonder if someeone could tell me how to specify that I would
2009 Jan 20
5
from matrix to data.frame
Hello, I have a question how to reshape a given matrix to a data frame. # ---------------------------------- > a <- matrix(1:25, nrow=5) > a [,1] [,2] [,3] [,4] [,5] [1,] 1 6 11 16 21 [2,] 2 7 12 17 22 [3,] 3 8 13 18 23 [4,] 4 9 14 19 24 [5,] 5 10 15 20 25 > colnames(a) <- LETTERS[1:5] > rownames(a) <-
2006 Nov 23
1
barplot - x-axis
Hi there, I have a barplot and the labels at the x-axis are strings, which are rotated by 90?. But now the sub-title of the barplot is in between these labels, which does not look very nice... Could anybody help me finding the parameter-setting to prevent this? par(mai=c(1.5,1,1,0.6)) barplot(data, las=2, ylim = c(0,plotMax+1), ylab = "Percentage", main = filename, sub = subtitle)
2009 Jan 21
3
merging several dataframes from a list
Hi there, I have a list of dataframes (generated by reading multiple files) and all dataframes are comparable in dimension and column names. They also have a common column, which, I'd like to use for merging. To give a simple example of what I have: df1 <- data.frame(c(LETTERS[1:5]), c(2,6,3,1,9)) names(df1) <- c("pos", "data") df3 <- df2 <- df1 df2$data