similar to: ks.test()

Displaying 20 results from an estimated 400 matches similar to: "ks.test()"

2009 May 31
1
Bug in truncgof package?
Dear R-helpers, I was testing the truncgof CRAN package, found something that looked like a bug, and did my job: contacted the maintainer. But he did not reply, so I am resending my query here. I installed package truncgof and run the example for function ad.test. I got the following output: set.seed(123) treshold <- 10 xc <- rlnorm(100, 2, 2) # complete sample xt <- xc[xc >=
2003 Jul 25
5
named list 'start' in fitdistr
Hi R lovers! I'd like to know how to use the parameter 'start' in the function fitdistr() obviously I have to provide the initial value of the parameter to optimize except in the case of a certain set of given distribution Indeed according to the help file for fitdistr " For the following named distributions, reasonable starting values will be computed if `start'
2013 May 10
1
rlnorm(n, meanlog = 0, sdlog = 1)
Hi list, Does anyone know the code behind rlnorm(n, meanlog = 0, sdlog = 1)? I am going to write it in c#. thanks Alireza [[alternative HTML version deleted]]
2005 Jun 29
2
MLE with optim
Hello, I tried to fit a lognormal distribution by using optim. But sadly the output seems to be incorrect. Who can tell me where the "bug" is? test = rlnorm(100,5,3) logL = function(parm, x,...) -sum(log(dlnorm(x,parm,...))) start = list(meanlog=5, sdlog=3) optim(start,logL,x=test)$par Carsten. [[alternative HTML version deleted]]
2008 May 04
1
Is my understanding of rlnorm correct?
rlnorm takes two 'shaping' parameters: meanlog and sdlog. meanlog would appear from the documentation to be the log of the mean. eg if the desired mean is 1 then meanlog=0. So to generate random values that fit a lognormal distribution I would do this: rlnorm(N , meanlog = log(mean) , sdlog = log(sd)) But when I check the mean I don't get it when sdlog>0. Interestingly I
2002 Dec 10
1
Lognormal distribution
I am trying to fit a lognormal distribution to a set of data and test its goodness of fit with regard to predicted values. I managed to get so far: > y <- c(2,6,2,3,6,7,6,10,11,6,12,9,15,11,15,8,9,12,6,5) > library(MASS) > fitdistr(y,"lognormal",start=list(meanlog=0.1,sdlog=0.1)) meanlog sdlog 1.94810515 0.57091032 (0.12765945) (0.09034437) But I would
2004 May 01
2
Generating Lognormal Random variables (PR#6843)
Full_Name: Anthony Gichangi Version: 1.90 OS: Windows XP Pro Submission from: (NULL) (130.225.131.206) The function rlnorm generates negative values for lognormal distribution. x- rlnorm(1000, meanlog = 0.6931472, sdlog = 1) Regards Anthony
2002 Jul 12
1
Minor bug in dlnorm (PR#1781)
The density of a lognormal should be 0 for negative arguments, but > dlnorm(-1) [1] NaN Warning message: NaNs produced in: dlnorm(x, meanlog, sdlog, log) A simple fix is to change dlnorm's definition to: function (x, meanlog = 0, sdlog = 1, log = FALSE) .Internal(dlnorm(x*(x>0), meanlog, sdlog, log)) It might be faster to put the same sort of adjustment into the internal code, but
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
2009 Feb 11
3
Generating Numbers With Certain Distribution in R
Dear all, Is there a way to generate K numbers of integer (K = 10^6). The maximum value of the integer is 200,000 and minimum is 1. And the occurrences of this integer follows a lognormal distribution. - Gundala Viswanath Jakarta - Indonesia
2003 Aug 05
1
error message in fitdistr
Hi R lovers Here is a numerical vector test > test [1] 206 53 124 112 92 77 118 75 48 176 90 74 107 126 99 84 114 147 99 114 99 84 99 99 99 99 99 104 1 159 100 53 [33] 132 82 85 106 136 99 110 82 99 99 89 107 99 68 130 99 99 110 99 95 153 93 136 51 103 95 99 72 99 50 110 37 [65] 102 104 92 90 94 99 76 81 109 91 98 96 104 104 93 99 125 89
2002 Mar 26
3
ks.test - continuous vs discrete
I frequently want to test for differences between animal size frequency distributions. The obvious test (I think) to use is the Kolmogorov-Smirnov two sample test (provided in R as the function ks.test in package ctest). The KS test is for continuous variables and this obviously includes length, weight etc. However, limitations in measuring (e.g length to the nearest cm/mm, weight to the nearest
2010 Jul 13
1
Batch file export
Dear all, I have a code that generates data vectors within R. For example assume: z <- rlnorm(1000, meanlog = 0, sdlog = 1) Every time a vector has been generated I would like to export it into a csv file. So my idea is something as follows: for (i in 1:100) { z <- rlnorm(1000, meanlog = 0, sdlog = 1) write.csv(z, "c:/z_i.csv") Where "z_i.csv" is a filename that is
2007 Mar 28
2
fitting data with conditions
Mich besch?ftig folgende Fragestellung. Ich kenne die Verteilung (lognormal) zus?tzlich weiss ich das 99%, das 90% und das 1% Quantil. Gibt es in R eine M?glichkeit die Lognormalverteilung zu finden, das heisst den korrespondierenden logmean und logsd? Vielen Dank f?r ihre Hilfe Gruss Yvonne
2012 May 22
4
Need to help to get value for bigger calculation
Hello R-Experts, I want to calculate values like 15^200 or 17^300 in R. In normal case it can calculate the small values of b (a^b). I have fixed width = 10000 and digits = 22 but still answers are Inf. How to deal the cases like these? Thanks in advance. Regards, rehena [[alternative HTML version deleted]]
2007 Oct 03
1
offset in survreg
Hello, I have a question regarding the use of an offset term with survreg(), in the Survival library. In particular, I am trying to figure out on what scale the offset term should be. Here's a simple example with no censoring and no coefficients: --------- y = rlnorm(1000, meanlog = 10, sdlog = 2) delta = rep(1, 1000) int = rep(1, 1000) survreg(Surv(y,delta)~offset(10*int), dist =
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
2011 Jun 07
1
R results explanation
Hi all, this might be a stupid question, but still. Everytime i find some new function it's prettty easy to understand how to use the syntax and to perform a text. Even the general idea of what the function does is pretty easy to understand, but i can not find an explanation (detailed explanation) of the R output for each function. For example, a function fitdistr() in MASS package i
2000 Apr 04
1
Question about the proper use of outer()
DeaR all, I do not have a clue with is the following NOT working like I expect to do... (and I cannot find any answer at CRAN)... # This one is for my sample > x _ seq(3,10) # This two for parameters > a _ seq(2,4) > b _ seq(2,5) # This one for the likelihood of a sample >f _ function(a,b) { + prod(dlnorm(x,meanlog=a,sdlog=b)) + } > outer(a,b,f) [,1] [,2]
2011 Jul 30
2
NAN problem
Hi All, Did anyone else have a problem like this? I am sorry if its a small issue, I seem to not understand what to do to get rid of this error. > Sigma [1] 0.1939025 > MuRest [1] 8.512772 > TauZero [1] 0.1 > curve(qlnorm(x,-TauZero+MuRest, Sigma,lower.tail=F), xlim=c(4000,9000), ylim=c(0,.99),xlab="", ylab="") Warning message: In qlnorm(p, meanlog, sdlog,