Displaying 20 results from an estimated 5000 matches similar to: "probability density function for maximum values in repeated finite samples from a normal distribution??"
2011 Oct 10
1
variable scope for deltavar function from emdbook
Dear all,
I want to use the deltavar() function from emdbook. I can use it
directly from the command terminal but within a function it behaves weird.
Working example:
----------------------
library("emdbook")
fn <- function()
{
browser()
y <- 2
print(deltavar(y*b2, meanval=c(b2=3), Sigma=1) )
}
x <- 2
print(deltavar(x*b1, meanval=c(b1=3), Sigma=1) )
y<-3
fn()
2017 Aug 24
1
Problem in optimization of Gaussian Mixture model
Hello,
I am facing a problem with optimization in R from 2-3 weeks.
I have some Gaussian mixtures parameters and I want to find the maximum in
that
*Parameters are in the form *
mean1 mean2 mean3 sigma1 sigma2 sigma3 c1 c2 c3
506.8644 672.8448 829.902 61.02859 9.149168 74.84682 0.1241933
0.6329082 0.2428986
I have used optima and optimx to find the
2010 Apr 21
2
Maximum Likelihood Estimation in R
Dear R-Help,
I also send the following post by e-mail to you, however I try to post it
here aswell. My name is Henrik and I am currently trying to solve a Maximum
Likelihood optimization problem in R. Below you can find the output from R,
when I use the "BFGS" method:
The problem is that the parameters that I get are very unreasonable, I would
expect the absolute value of each
2008 Jun 24
2
L-BFGS-B needs finite values of 'fn'
Hi,
When I run the following code,
r <- c(3,4,4,3,5,4,5,9,8,11,12,13)
n <- rep(15,12)
x <- c(0, 1.1, 1.3, 2.0, 2.2, 2.8, 3.7, 3.9, 4.4, 4.8, 5.9, 6.8)
x <- log10(x)
fr <- function(c, alpha, beta) {
P <- c + (1-c) * pnorm(alpha + beta * x)
P <- pmax(pmin(P,1),0)
-(sum(log(choose(n,r))) + sum(r * log(P)) + sum((n -r)* log(1-P)))
}
fit <- mle((fr), start = list(c
2010 Sep 21
5
Combined plot: Scatter + density plot
Hi,
in order to save space for a publication, it would be nice to have a
combined scatter and density plot similar to what is shows on
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78
I wonder if anybody perhaps has already developed code for this and is
willing to share. This is the reproducible code for the histogram
version obtained from the site:
def.par <-
2018 Feb 20
0
Take the maximum of every 12 columns
Ista, et. al: efficiency?
(Note: I needed to correct my previous post: do.call() is required for
pmax() over the data frame)
> x <- data.frame(matrix(runif(12e6), ncol=12))
> system.time(r1 <- do.call(pmax,x))
user system elapsed
0.049 0.000 0.049
> identical(r1,r2)
[1] FALSE
> system.time(r2 <- apply(x,1,max))
user system elapsed
2.162 0.045 2.207
##
2018 Feb 20
3
Take the maximum of every 12 columns
This is what I was looking for. Thank you everyone!
Sincerely,
Milu
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Mail
priva di virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
2018 Feb 20
2
Take the maximum of every 12 columns
On Tue, Feb 20, 2018 at 11:58 AM, Bert Gunter <bgunter.4567 at gmail.com>
wrote:
> Ista, et. al: efficiency?
> (Note: I needed to correct my previous post: do.call() is required for
> pmax() over the data frame)
>
> > x <- data.frame(matrix(runif(12e6), ncol=12))
>
> > system.time(r1 <- do.call(pmax,x))
> user system elapsed
> 0.049 0.000
2018 Feb 20
0
Take the maximum of every 12 columns
It looks like OP uses a data.frame, so in order to use matrixStats
(I'm the author) one would have to pay the price to coerce to a matrix
before using matrixStats::rowMaxs(). However, if it is that the
original data could equally well live in a matrix, then matrixStats
should be computational efficient for this task. (I've seen cases
where an original matrix was turned into a data.frame
2007 Apr 19
2
Using "mean" if two values are identical
Hello,
I have got a question.
I've got a matrix (mail end) with the colnames x, y, z. In this matrix
are different measurements. x and y are risign coordinates.
My question. Always, if the "x" AND "y" coordinates are the same, I want to
get the mean of their z values.
e.q. "
x" AND "y" in line1 and line8 are identical:
29 4.5 --> mean of
2017 Jan 17
32
[PATCH 0/6] drm/nouveau: Enable HDMI Stereoscopy
This is an initial implementation of HDMI 3D mode support for the
nouveau kernel driver. It works on all of the hardware that I have
available to test at the moment, but I am unsure as to the overall
approach taken for setting HDMI InfoFrames, there's no support for g84
or gf119 disps, and the criteria for enabling stereo support for an
output seems a bit iffy.
The first four patches arrange
2018 Feb 20
0
Take the maximum of every 12 columns
Thank you for your kind replies. Maybe I was not clear with my question (I
apologize) or I did not understand...
I would like to take the max for X0...X11 and X12...X24 in my dataset. When
I use pmax with the function byapply as in
byapply(df, 12, pmax)
I get back a list which I cannot convert to a dataframe. Am I missing
something? Thanks again!
Sincerely,
Milu
2009 May 28
1
maximum over one dimension of a 3-dimensional array
Hi,
I'm running R 2.7.2 on windows XP. I'd like to find the maximum of a
3-d array over it's third index to create a 2-d array. For example:
> x <- array(c(1,2,3,10,11,12,3:8),c(2,3,2))
> x
, , 1
[,1] [,2] [,3]
[1,] 1 3 11
[2,] 2 10 12
, , 2
[,1] [,2] [,3]
[1,] 3 5 7
[2,] 4 6 8
> x1 <- x[,,1]
> x2 <- x[,,2]
>
2018 Feb 20
2
Take the maximum of every 12 columns
Don't do this (sorry Thierry)! max() already does this -- see ?max
> x <- data.frame(a =rnorm(10), b = rnorm(10))
> max(x)
[1] 1.799644
> max(sapply(x,max))
[1] 1.799644
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone
I have a piece of code that looks like this:
mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120",
stdev="BMM.SD120"))
mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120",
stdev="GM1.SD120"))
mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120",
2008 Jun 10
4
Problems configuring a PRI...
I'm trying to get a Qwest PRI configured and working with my lab
Asterisk server. They said that the switchtype is 5ess and the signaling
is pri_cpe. My entries into zaptel.conf are:
span=1,0,0,esf,b8zs
bchan=1-23
dchan=24
loadzone = us
defaultzone=us
channels=1-23
And my entries in zapata.conf are:
language=en
context=telco-incoming
switchtype=5ess
signalling=pri_cpe
2006 Dec 29
1
Why giving negative density when doing kernel density estimate?
Why? And how to solve it? The code and result are following,
> data=rnorm(50)
>
> kde=density(data,n=20,from=-1,to=10)
>
> kde$x;kde$y
[1] -1.0000000 -0.4210526 0.1578947 0.7368421 1.3157895 1.8947368
[7] 2.4736842 3.0526316 3.6315789 4.2105263 4.7894737 5.3684211
[13] 5.9473684 6.5263158 7.1052632 7.6842105 8.2631579 8.8421053
[19] 9.4210526 10.0000000
[1]
2012 Jun 01
4
[PATCH v3] virtio_blk: unlock vblk->lock during kick
Holding the vblk->lock across kick causes poor scalability in SMP
guests. If one CPU is doing virtqueue kick and another CPU touches the
vblk->lock it will have to spin until virtqueue kick completes.
This patch reduces system% CPU utilization in SMP guests that are
running multithreaded I/O-bound workloads. The improvements are small
but show as iops and SMP are increased.
Khoa Huynh
2012 Jun 01
4
[PATCH v3] virtio_blk: unlock vblk->lock during kick
Holding the vblk->lock across kick causes poor scalability in SMP
guests. If one CPU is doing virtqueue kick and another CPU touches the
vblk->lock it will have to spin until virtqueue kick completes.
This patch reduces system% CPU utilization in SMP guests that are
running multithreaded I/O-bound workloads. The improvements are small
but show as iops and SMP are increased.
Khoa Huynh
2013 Feb 11
2
How to plot doubles series with different location using plotCI
Dear list
members,
I would
like to create two series of plotted mean values and error bars, yet with
different locations along the x-axis.
Plotting of
first series using plotCI with the standard arguments goes without any problem.
However I do not succeed to add the second series in the same plot, which
should be horizontally shifted from the first series along the x-axis. The “add=TRUE”