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

Did you mean:
probe

2010 Nov 18

1

dmultinomial

...ximum likelihood 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, prob)
&g...

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...

2013 Jul 08

1

Segmentar archivos en R (Antonio José Sáez Castillo)

Habría que buscar la vuelta, yo no lo se, pero posiblemente lo siguiente da una pista.
Nota: al mismo código le sume una línea al final
datos<-c(2,3,4,5,6,7,8)
quantile(datos)
quantile(datos,probs = c(0.25, 0.75, 0.85, 0.90, 0.95))
as.matrix(quantile(datos,probs = c(0.25, 0.75, 0.85, 0.90, 0.95)))
as.data.frame(quantile(datos,probs = c(0.25, 0.75, 0.85, 0.90, 0.95)))
# ¿ y si solo solicita uno por vez ?
as.matrix(quantile(datos,probs = c(0.25)))
as.matrix(quantile(datos,probs = c(0.75)))
cb...

1998 Feb 26

3

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

3

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

2

"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

2

"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 01

0

"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...

2013 Jul 08

2

Segmentar archivos en R (Antonio José Sáez Castillo)

Estimado Mauricio Monsalvo
Le paso una idea, no es un código muy lindo que digamos, pero al correrlo
seguramente se dará cuenta de mi sugerencia.
datos<-c(2,3,4,5,6,7,8)
quantile(datos)
quantile(datos,probs = c(0.25, 0.75, 0.85, 0.90, 0.95))
as.matrix(quantile(datos,probs = c(0.25, 0.75, 0.85, 0.90, 0.95)))
as.data.frame(quantile(datos,probs = c(0.25, 0.75, 0.85, 0.90, 0.95)))
# ¿ y si solo solicita uno por vez ?
as.matrix(quantile(datos,probs = c(0.25)))
as.matrix(quantile(datos,probs = c(0.75)))
cb...

2017 Nov 02

2

"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 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

2

"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

0

"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...

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

0

"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...

2017 Nov 02

0

"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

2

"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

...es
Error 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(R, rinv)
4...