Displaying 20 results from an estimated 611 matches for "prob".

Did you mean:
pro

2010 Nov 18

2

dmultinomial

...d analysis using dmultinomial (i''m
avoiding dmultinom as I''d like to run it with vectors for the ML stuff).
However, I''m having a hard time getting even the simplest example
running. Any help would be greatly appreciated.
> library(mc2d)
> dmultinomial(x=c(0,0,1),prob=c(1,1,1),size=1,log=TRUE)
Error in if (ncol(x) != K) stop("x[] and prob[] must be equal length
vectors or equal col matrix.") :
argument is of length zero
# Once I get the simple stuff above running, I''d like to be able to do
the following:
> testmat=rmultinomial(4, 1, pro...

2007 Jan 05

1

Efficient multinom probs

Dear R-helpers,
I need to compute probabilties of multinomial observations, eg by doing the
following:
y=sample(1:3,15,1)
prob=matrix(runif(45),15)
prob=prob/rowSums(prob)
diag(prob[,y])
However, my question is whether this is the most efficient way to do this.
In the call prob[,y] a whole matrix is computed which seems a bit of a...

2000 May 12

1

Geometric Distribution at prob=c(0,1)

...the time being, and I''m
confused. This may have more to do with statistics than R itself, but
since I''m getting results from R I find counterintuitive (well, yeah, my
statistical intuition has not been properly sharpened), I feel like
asking.
The point first:
If I do
> rgeom(1,prob=1)
I get:
[1] NaN
Warning message:
NAs produced in: rgeom(n, prob)
And if I do:
> rgeom(1,prob=0)
I get:
[1] NaN
Warning message:
NAs produced in: rgeom(n, prob)
I was expecting to get 0 and Inf respectively.... Should I expect that?
Going back to my textbooks (Dudewicz and Mishra 1988, pr...

1998 Feb 26

7

R-beta: quantile

I do:
x<-rnorm(1000)
quantile(x,c(.025,.975))
2% 98%
-1.844753 1.931762
Since I want to find a 95% confidence interval, I take the .025 and .975
quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%)
points. Is it just rounding the printed 2% and 98%, or is it REALLY
finding .02 and .98 points instead of .025 and .975?
Thanks for any help.
Bill Simpson

1998 Feb 26

7

R-beta: quantile

I do:
x<-rnorm(1000)
quantile(x,c(.025,.975))
2% 98%
-1.844753 1.931762
Since I want to find a 95% confidence interval, I take the .025 and .975
quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%)
points. Is it just rounding the printed 2% and 98%, or is it REALLY
finding .02 and .98 points instead of .025 and .975?
Thanks for any help.
Bill Simpson

2017 Nov 01

1

"prob" package alternative

> On Nov 1, 2017, at 12:51 PM, Tiby Kantrowitz <tlkantro at gmail.com> wrote:
>
> The prob package has been archived because it depends upon some other
> packages which have issues.
>
> However, such projects as Introduction to Probability and Statistics in R
> depend upon it for learning. There are a few other resources that also use
> it.
>
> Does anyone know of...

2017 Jun 15

1

(no subject)

...r Bayesian networks and using r studio I get a fatal error and when I use R GUI I get this error
** caught segfault ***
address 0xfffffffc0fcd6248, cause 'memory not mapped' Traceback: 1:
.Call("mappred", node = node, fitted = fitted, data = data, n =
as.integer(n), from = from, prob = prob, debug = debug) 2:
map.prediction(node = node, fitted = object, data = data, n =
extra.args$n, from = extra.args$from, prob = prob, debug = debug) 3:
predict.bn.fit(values10$fitted, input$targetvariables, combn2, prob =
TRUE, method = "bayes-lw") 4: predict(values10$fitted,
input$t...

2017 Nov 02

1

"prob" package alternative

> On Nov 2, 2017, at 12:07 PM, Tiby Kantrowitz <tlkantro at gmail.com> wrote:
>
> Yes. That's the version I've been discussing that has non-zero exit status. That situation is why CRAN retired the prob package. It's possible you installed that library earlier in development and it's been "carried" along. It no longer installs, now.
>
> The problems with all of this seem to have started this month according to the conversations. However, no one has mentioned any solutions...

2017 Nov 02

1

"prob" package alternative

Yes, that is exactly what I was doing two days ago.
Warning in install.packages :
installation of package ?fAsianOptions_3010.79.tar.gz? had non-zero exit
status
Which is what a reading of the explanation for why "prob" was retired leads
one to expect. Do you have some other suggestion about how to get it to
work? I notice you're not using Windows which might have a relationship to
why it is working for you.
Otherwise, do you know of some other package that could be used instead of
prob?
On Thu, Nov 2,...

2017 Nov 02

1

"prob" package alternative

The issue is fAsianOptions. Is there a version that works with the latest
version of R? If not, which version of it works with which version of R and
where can it be found? I tried several at the archive already.
Alternatively, is there another package that behaves similarly to prob?
On Wed, Nov 1, 2017 at 6:17 PM, David Winsemius <dwinsemius at comcast.net>
wrote:
>
> > On Nov 1, 2017, at 12:51 PM, Tiby Kantrowitz <tlkantro at gmail.com> wrote:
> >
> > The prob package has been archived because it depends upon some other
> > packages...

2017 Nov 02

1

"prob" package alternative

Yes. That's the version I've been discussing that has non-zero exit status.
That situation is why CRAN retired the prob package. It's possible you
installed that library earlier in development and it's been "carried"
along. It no longer installs, now.
The problems with all of this seem to have started this month according to
the conversations. However, no one has mentioned any solutions or
workaro...

2017 Nov 02

1

"prob" package alternative

...ttp://www.rmetrics.org
Packaged: 2013-06-23 18:22:14 UTC; yohan
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2013-06-24 01:53:27
Built: R 3.4.2; x86_64-apple-darwin15.6.0; 2017-11-01 22:45:02 UTC; unix
> Alternatively, is there another package that behaves similarly to prob?
>
>
>
> On Wed, Nov 1, 2017 at 6:17 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
> > On Nov 1, 2017, at 12:51 PM, Tiby Kantrowitz <tlkantro at gmail.com> wrote:
> >
> > The prob package has been archived because it depends upon some othe...

2010 Feb 14

4

Problem in performing goodness of fit test in R.

...p://wiener.math.csi.cuny.edu/Statistics/R/simpleR/stat013.html for help. However, I am unable to carry out the test successfully. My code follows. It is taken from the website just mentioned.
freq=c(22,21,22,27,22,36) # frequencies obtained after rolling the dice 150 times.
prob=c(1,1,1,1,1,1)/6 # specify expected frequency for each category.
chisq.test(freq,p=prob) # I do not know what this line means. I just followed instructions on the website.
The erorr I receive is "erorr in chisq.test(freq,p=prob)/6 probabilities must sum to 1"
I am very new to R,...

2017 Nov 02

1

"prob" package alternative

...itz <tlkantro at gmail.com> wrote:
>
> Yes, that is exactly what I was doing two days ago.
>
> Warning in install.packages :
> installation of package ?fAsianOptions_3010.79.tar.gz? had non-zero exit status
>
> Which is what a reading of the explanation for why "prob" was retired leads one to expect. Do you have some other suggestion about how to get it to work? I notice you're not using Windows which might have a relationship to why it is working for you.
I explained what you needed to do if you were on Windows. You do need to read the explanation m...

2017 Nov 02

1

"prob" package alternative

...te:
> >
> > Yes, that is exactly what I was doing two days ago.
> >
> > Warning in install.packages :
> > installation of package ?fAsianOptions_3010.79.tar.gz? had non-zero
> exit status
> >
> > Which is what a reading of the explanation for why "prob" was retired
> leads one to expect. Do you have some other suggestion about how to get it
> to work? I notice you're not using Windows which might have a relationship
> to why it is working for you.
>
>
> I explained what you needed to do if you were on Windows. You do ne...

2007 Aug 22

1

"subscript out of bounds" Error in predict.naivebayes

...ror in FUN(1:9319[[4L]], ...) : subscript out of bounds
# Here''s what traceback() returns
10: FUN(1:9319[[4L]], ...)
9: lapply(X, FUN, ...)
8: sapply(1:nattribs, function(v) {
nd <- ndata[v]
if (is.na(nd))
rep(1, length(object$apriori))
else {
prob <- if (isnumeric[v]) {
msd <- object$tables[[v]]
dnorm(nd, msd[, 1], msd[, 2])
}
else object$tables[[v]][, nd]
prob[prob == 0] <- threshold
prob
}
})
7: log(sapply(1:nattribs, function(v) {
nd <-...

2007 Feb 22

0

Error in solve.default

I am trying to run the following function (a hierarchical bayes linear
model) and receive the error in solve.default. The function was
originally written for an older version of SPlus. Can anyone give me some
insights into where the problem is?
Thanks
R 2.4.1 on MAC OSX 2mb ram
Mark Grant
markg at uic.edu
> attach(Aspirin.frame)
> hblm(Diff ~ 1, s = SE)
Error in solve.default(R, rinv) : ''a'' is 0-diml
> traceback()
6: .Call("La_dgesv", a, b, tol, PACKAGE = "base")
5: solve.default(...

2017 Nov 01

1

"prob" package alternative

The prob package has been archived because it depends upon some other
packages which have issues.
However, such projects as Introduction to Probability and Statistics in R
depend upon it for learning. There are a few other resources that also use
it.
Does anyone know of any workarounds?
Someone at stack...

2017 Nov 02

1

"prob" package alternative

...; wrote:
> >
> > Yes, that is exactly what I was doing two days ago.
> >
> > Warning in install.packages :
> > installation of package ?fAsianOptions_3010.79.tar.gz? had non-zero exit status
> >
> > Which is what a reading of the explanation for why "prob" was retired leads one to expect. Do you have some other suggestion about how to get it to work? I notice you're not using Windows which might have a relationship to why it is working for you.
>
>
> I explained what you needed to do if you were on Windows. You do need to read th...

2013 May 23

5

sample(c(0, 1)...) vs. rbinom

...to sampling from a binomial
distribution. I''ve appended some code that exhibits the idea, the gist of
which is that using sample(c(0, 1), ...) and rbinom(...) should give
equivalent results.
The surprising (to me) result is that the two approaches DO give the same
result, EXCEPT when the probability is exactly 0.5. See Appendix A for the
code and Appendix B for the output. I don''t think this issue is
system-dependent, but I''ve put my session information in Appendix C.
Another wrinkle in this is that if I omit the "prob" parameter from the call
to sample, m...