Displaying 20 results from an estimated 700 matches similar to: "Binomial simulation"
2009 Jun 08
1
Interpreting R -results for Bivariate Normal
HI Guys,
I know that this forum is not for homework but I am trying to interpret R
output code.
I was just wondering if someone might be able to help.
I have been given the following.
For (X1,X2) distributed bivariate normal with parameters
mu1 = 5.8
mu2 = 5.3
sd1 = sd2 = 0.2
and p = 0.6
The r-code and inpit/output are as follows
input
m <- 5.3 + 0.6*(6.3 - 5.8)
s <-
2007 Apr 05
1
binom.test() query
Hi Folks,
The recent correspondence about "strange fisher.test result",
and especially Peter Dalgaard's reply on Tue 03 April 2007
(which I want to investigate further) led me to take a close
look at the code for binom.test().
I now have a query!
The code for the two-sided case computes the p-value as follows:
if (p == 0) (x == 0)
else
if (p == 1) (x == n)
2005 Jun 19
1
practical help ... solving a system...
Hello,
I want to estimate the parameters of a binomial distributed rv using MLE.
Other distributions will follow.
The equation system to solve is not very complex, but I've never done such
work in R and don't have any idea how to start...
The system is:
(1) n*P = X
(2) [sum {from j=0 to J-1} Y{j} /(n-j)] = -n * ln (1-X / n)
where * only X is given (empirical mean)
2006 Mar 22
4
pbinom( ) function (PR#8700)
Full_Name: Chanseok Park
Version: R 2.2.1
OS: RedHat EL4
Submission from: (NULL) (130.127.112.89)
pbinom(any negative value, size, prob) should be zero.
But I got the following results.
I mean, if a negative value is close to zero, then pbinom() calculate
pbinom(0, size, prob). dbinom() also behaves similarly.
> pbinom( -2.220446e-22, 3,.1)
[1] 0.729
> pbinom( -2.220446e-8, 3,.1)
2005 Apr 13
1
i param in "for" loop does not takes zeros?
Hi all
Is there any reason why the parameter i in a "for" loop ignores a value of
zero? For example
sim=c()
p=.2
for(i in 0:5)
{sim[i]=dbinom(i,5,p)
}
sim
[1] 0.40960 0.20480 0.05120 0.00640 0.00032
In this example the quantile i= 0 was ignored since
dbinom(0,5,p)
[1] 0.32768
The same behaviour occurs if I use a while loop to perform the same
calculation:
sim=c()
p=.2
i=0
2011 Jan 27
1
binomial dist: obtaining probability of success on each trial
I'm trying to fathom how to answer two example problems (3.3.2 & 3.3.3) in:
Krishnamoorthy. 2006. "handbook of statistical distributions with applications"
The first requires calculating single trial probability of success for a binomial distribution when we know:
trial size=20, successes k=4, P(x<=k)=0.7
Appreciably all the binomial functions are requiring "prob",
2007 Apr 06
1
dbinom and Catherine Loader
Hi Folks,
There has been past correspondence regarding Catherine Loader's
Bell Labs (oops, Lucent) paper
"Fast and Accurate Computation of Binomial Probabilities"
which gives the algorithm on which R's dbinom() is based.
The original URL given in the R documentation "?dbinom" is:
http://cm.bell-labs.com/cm/ms/departments/sia/catherine/dbinom
but this link is
2020 May 18
3
dbinom link
In principle a good idea, but I'm not sure the whereabouts of Catherine Loader are known at this point. Last peeps from her on the net seem to be about a decade old.
.pd
> On 18 May 2020, at 10:31 , Abby Spurdle <spurdle.a at gmail.com> wrote:
>
> This has come up before.
>
> Here's the last time:
> https://stat.ethz.ch/pipermail/r-devel/2019-March/077478.html
2010 Dec 10
2
survival package - calculating probability to survive a given time
Dear R users,
i try to calculate the probabilty to survive a given time by using the
estimated survival curve by kaplan meier.
What is the right way to do that? as far as is see i cannot use the
predict-methods from the survival package?
library(survival)
set.seed(1)
time <- cumsum(rexp(1000)/10)
status <- rbinom(1000, 1, 0.5)
## kaplan meier estimates
fit <- survfit(Surv(time,
2005 Jan 16
2
Empirical cumulative distribution with censored data
Dear list,
I would like to plot the empirical cumulative distribution of the time
needed by a treatment to attain a certain goal. A number of
experiments is run with a strict time limit. In some experiments the
goal is attained before the time limit, in other experiments time
expires before the goal is attained. The situation is very similar to
survivial analysis with censored data. I tryed
2009 Feb 05
1
Incorrect p value for binom.test?
I believe the binom.test procedure is producing one tailed p values
rather than the two tailed value implied by the alternative hypothesis
language. A textbook and SAS both show 2*9.94e-07 = 1.988e-06 as the
two tailed value. As does the R summation syntax from R below. It
looks to me like the alternative hypothesis language should be revised
to something like " ... greater than or equal
2010 Feb 21
1
how do I get the legend?
http://en.wikipedia.org/wiki/Binomial_distribution Bino
Hi there,
How can I get the legend in the probability density plot in that
http://en.wikipedia.org/wiki/File:Binomial_distribution_pmf.svg wiki page ?
and the cumalative plot as well?
====================================
# Binomial Distribution
x=0:40
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example.
I modified a little to fit my real data, I got an error massage.
Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :
Group length is 0 but data length > 0
On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] <
ml-node+s789695n4657196h87@n4.nabble.com> wrote:
> Hi,
> Try this:
>
2009 Sep 04
1
Best Way to Compute/Approximate(?) Probabilty of a Point in a Given Distribution
AFAIK, R only has "pnorm" which computes the probability of getting a
value smaller or equal to "x" from
a normal distribution N[mean,stdev]. For example:
R> pnorm(0, 4, 10)
[1] 0.3446
means there is 34.46% chance of getting a value equal to or smaller
than 0 from a N(4, 10) distribution.
What I intend to get is: given the observed value "x", mean, and stdev
2008 Sep 29
4
histogram-like plot with two variables
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080929/e8ff7cb6/attachment.pl>
2012 Feb 01
3
Probit regression with limited parameter space
Dear R helpers,
I need to estimate a probit model with box constraints placed on several of
the model parameters. I have the following two questions:
1) How are the standard errors calclulated in glm
(family=binomial(link="probit")? I ran a typical probit model using the
glm probit link and the nlminb function with my own coding of the
loglikehood, separately. As nlminb does not
2003 Jan 22
2
small bug in binom.test?
Hi all,
I am wondering whether there is a small bug in the binom.test function of
the ctest library (I'm using R 1.6.0 on windows 2000, but Splus 2000 seems
to have the same behaviour). Or perhaps I've misunderstood something.
the command binom.test(11,100,p=0.1) and binom.test(9,100,p=0.1) give
different p-values (see below). As 9 and 11 are equidistant from 10, the
mean of the
2011 Mar 19
2
problem running a function
Dear people,
I'm trying to do some analysis of a data using the models by Royle & Donazio
in their fantastic book, particular the following function:
http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn
that applied to my data and in the console is as follows:
> `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2020 May 18
2
dbinom link
FWIW the link from ?dbinom to the Loader paper on Binomials is broken but the paper seems to be
available here: https://octave.1599824.n4.nabble.com/attachment/3829107/0/loader2000Fast.pdf
Roger Koenker
r.koenker at ucl.ac.uk<mailto:r.koenker at ucl.ac.uk>
Honorary Professor of Economics
Department of Economics, UCL
Emeritus Professor of Economics
and Statistics, UIUC
[[alternative
2009 Jul 14
1
Simulation functions for underdispered Poisson and binomial distributions
Dear R users
I would like to simulate underdispersed Poisson and binomial
distributions somehow.
I know you can do this for overdispersed counterparts - using
rnbinom() for Poisson and rbetabinom() for binomial.
Could anyone share functions to do this? Or please share some tips for
modifying existing functions to achieve this.
Thank you very much for your help and time
Shinichi