Displaying 20 results from an estimated 300 matches similar to: "Need to help to get value for bigger calculation"
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]]
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
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
2012 Feb 17
6
convert zoo object to "standard" R object so I can plot and output to csv file
Another newbie question
I got the 1 minute spine interpolation and 15 mean aggregation working with
many thanks to Gabor Grothendieck using Zoo functions. I got a tip from
Hasan Diwan to look at xts but it seemed I would make better progress using
code from Gabor.
Now I'm having trouble plotting this zoo object. I'm thinking I want a
function to "split" the zoo object back to
2010 May 07
2
glm contrasts
Hi,
I have some data on the effect of cycle shape (categorical) and
frequency (continuous) on the efficiency of muscle contraction. My
minimum adequate model is:
m15<-glm(efficiency~cycle.shape*freq, family=quasipoisson)
However, I wish to know where significant differences lie between
specific combinations of treatments. I guess I want an equivalent of a
post hoc test following an
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
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]
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
2006 Aug 26
4
Can R compute the expected value of a random variable?
Dear All
Can R compute the expected value of a random variable?
Thanks in advance,
Paul
2003 Aug 28
2
ks.test()
Dear All
I am trying to replicate a numerical application (not computed on R) from an
article. Using, ks.test() I computed the exact D value shown in the article
but the p-values I obtain are quite different from the one shown in the
article.
The tests are performed on a sample of 37 values (please see "[0] DATA"
below) for truncated Exponential, Pareto and truncated LogNormal
2010 Jan 04
1
log normal overlay
Hello,
Using the following lines of code, I created the following graph:
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
2009 Apr 04
2
threshold distribution
Dear ALL
I have a list of data below
0.80010 0.72299 0.69893 0.99597 0.89200 0.69312 0.73613 1.13559
0.85009 0.85804 0.73324 1.04826 0.84002
1.76330 0.71980 0.89416 0.89450 0.98670 0.83571 0.73833 0.66549
0.93641 0.80418 0.95285 0.76876 0.82588
1.09394 1.00195 1.14976 0.80008 1.11947 1.09484 0.81494 0.68696
0.82364 0.84390 0.71402 0.80293 1.02873
all of them are ninty.
Nowaday, i try to find a
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'
2011 May 19
2
Unicorn preload_app and upstart
?Hi,
I was wondering if anyone has managed to get the preload_app and SIGUSR2
combination working well with upstart?
My issue currently is that when I perform a SIGUSR2 against the master,
check everything''s working and close off the old master, upstart then
attempts to restart it because the original PID/binary are no longer
running.
What is the correct way of handling this? In my
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
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]]
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
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
2006 Jul 03
1
panel ordering in nlme and augPred plots
Hi,
I'm new at this, I'm very confused, and I think I'm missing something
important here. In our pet example we have this:
> fm <- lme(Orthodont)
> plot(Orthodont)
> plot(augPred(fm, level = 0:1))
which gives us a trellis plot with the females above the males,
starting with "F03", "F04", "F11", "F06", etc. I thought the point of