Displaying 20 results from an estimated 400 matches similar to: "Quantiles of sums of independent discrete random variables"
2007 Feb 01
3
Help with efficient double sum of max (X_i, Y_i) (X & Y vectors)
Greetings.
For R gurus this may be a no brainer, but I could not find pointers to
efficient computation of this beast in past help files.
Background - I wish to implement a Cramer-von Mises type test statistic
which involves double sums of max(X_i,Y_j) where X and Y are vectors of
differing length.
I am currently using ifelse pointwise in a vector, but have a nagging
suspicion that there is a
2009 Apr 02
1
matrix vectorization or something else??
Hello
This may have been answered elsewhere, and I have looked on the web, but nothing helps. I am trying to do the following:
X<-matrix(c(1:15),nrow=3,byrow=T)
Y<-matrix(c(2,4,6,8,10),ncol=1)
I need to sum the product of each row of X by the remaining j rows multiplied by j y values (i.e sum( t(x_i) x_j y_j) )
Hope this makes sense.
Thanks in advance.
Ps: how do I reference all
2007 May 21
1
Sample correlation coefficient question NOT R question
This is a statistics question not an R question. When calculating the
sample correlation coefficient cor(x_t,y_t) between say
two variables, x_t and y_t t=1,.....n ( one can assume that the
variables are in time but I don't think this really matters
for the question ), does someone know where I can find any piece of
literature that says that each (x_j,y_j) pair has
To be independent from the
2011 Jan 25
3
Integration of two lines
Hello,
I need to integrate the absolute difference between two lines measured
on different points.
# For example :
x <- seq(0, 1, 1/100)
f_x <- runif(101) + x
y <- seq(0, 1, 1/23)
f_y <- runif(24) + (1 - y)
plot(x, f_x, type="l")
lines(y, f_y)
Then I would like to compute Integral( | f_x - f_y | )dx.
(This is not the same as | Integral(f_x)dx - Integral(f_y)dx |.)
2012 Oct 27
0
[gam] [mgcv] Question in integrating a eiker-white "sandwich" VCV estimator into GAM
Dear List,
I'm just teaching myself semi-parametric techniques. Apologies in
advance for the long post.
I've got observational data and a longitudinal, semi-parametric model
that I want to fit in GAM (or potentially something equivalent), and I'm
not sure how to do it. I'm posting this to ask whether it is possible
to do what I want to do using "canned" commands
2010 Feb 09
0
Kernel density / weights matrix?
Dear everyone,
I'm coding the Horowitz-Spokoiny (2001) test [1], and I would be very
grateful or some advice regarding the Kernel density (apologies
beforehand if my terminology is not fully correct). I have looked into
ksmooth and npreg, but with no success.
Given a (n x p) matrix of covariates X, I need to construct the
following matrix of Kernel densities or weights:
w(x_i, x_j) =
2013 Nov 19
1
Generación de números aleatorios. Mixtura k-puntos
Saludo cordial para cada uno.
Les pido ayuda para generar números aleatorios de una mixtura k-puntos.
Sabemos que la función de distribución F es una mixtura k-puntos si es de
la forma F(x) = p_1 F_1(x) + p_2 F_2(x) + … + p_k F_k(x), donde F_j es una
función de distribución de probabilidad, p_j > 0 y suma(p_j) = 1, para j =
1, 2, …, k.
En mi caso particular F es la suavización de la
2024 Jan 24
0
Quantiles of sums of independent discrete random variables
Greetings,
Minimal reproducible example as requested by the technical expert Jeff Newmiller:
library(bayesmeta)
# density of $(1/10)*\sum_{j=1}{10}N(j,0.01$
# (convex sum of normal distributions)
#
f <- Vectorize(function(s) sum(vapply(1:10,
?? FUN = function(j) dnorm(s,mean=j,sd=0.01)/10, FUN.VALUE=0
)))
g <- function(s) dnorm(s,mean=0,sd=0.01)
cat("\n\n")
for(i in 1:5){
? ?
?
2001 Jan 02
0
mdct explanation
...as promised.
This describes the mdct used in my d.m.l patch. I think it is the
same as the Lee fast-dct.
I typed it in a kind of pseudo-TeX, 'cause the ascii art would
kill me. Hope you can read TeX source; if not, ask someone who
can to make a .ps/.gif/.whatever of the TeX output, and put it
on a webpage or something. I'm to lazy to do it (and besides, I
don't have access to TeX,
2006 Dec 14
3
Model formula question
Hi all,
I'm not familiar with R programming and I'm trying to reproduce a
result from a paper.
Basically, I have a dataset which I would like to model in terms of
successive increments, i.e. (y denote empirical values of y)
y_1 = y1,
y_2 = y1 + delta1,
y_3 = y1 + delta1 + delta2.
...
y_m = y1 + sum_2^m delta j
where delta_j donote successive increments in the y-values, i.e.
delta
2003 Aug 15
2
Oja median
I discovered recently that the phrase "Oja median" produces no hits in
Jonathan Baron's very valuable R search engine. I found this surprising
since I've long regarded this idea as one of the more interesting notions
in the multivariate robustness literature. To begin to remedy this oversight
I wrote a bivariate version and then decided that writing a general p-variate
version
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer
Thanks for your thoughts on this. I did a bit of work and did end up
with a method (more a trick), but it did work. I am certain there are
better ways to do this, but here is how I resolved the issue.
The integral I need to evaluate is
\begin{equation}
\frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta}
{\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta}
\end{equation}
Where
2001 Jul 12
1
more subroutines for integrate()
I was pleased to find integrate() using the quadpack routines "dqags" and
"dqagi". However, I would also like to have the routine "dqawoe"
included. This routine is summarized as follows...
c***keywords automatic integrator, special-purpose,
c integrand with oscillatory cos or sin factor,
c clenshaw-curtis method, (end point) singularities,
2011 Apr 21
0
C source code question (Robustbase edition)
Hi all,
I have been trying to add the line:
h = n - p0 + 1;
just after
h = n / 2 + 1;
(line 131) in the source code (the original paper mention this is possible
for p0<n).
with p0 declared as an int (actually i used the same declaration
protocol as n everywhere in the code).
The "new" source compiles, but when i give it reasonable
values of p0, it runs unto
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List:
Thank you for the replies to my post yesterday. Gabor and Phil also gave
useful replies on how to improve the function by relying on mapply
rather than the explicit for loop. In general, I try and use the family
of apply functions rather than the looping constructs such as for, while
etc as a matter of practice.
However, it seems the mapply function in this case is slower (in terms
of CPU
2006 Dec 14
0
Model formula
Hi there,
I've sent this e-mail to the list twice but didn't get it back from
the list. Have it reach list members?
cheers,
Ronaldo
---------- Forwarded message ----------
From: Ronaldo Prati <rcprati at gmail.com>
Date: 14/12/2006 11:59
Subject: Model formula question
To: r-help at stat.math.ethz.ch
Hi all,
I'm not familiar with R programming and I'm trying to
2011 Jul 01
0
How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
Dear R users,
subject: How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
or subject as: How to filter XY pairs of inacurate gps position: (latitude, longtitude)
to get estimated correct position before calculating track
i.e.
How to estimate (time series? )?
How to filter XY pairs of
2000 Jan 01
0
Re: Tests in linear regression
>>>>> "FrSa" == SABIDO =?iso-8859-1?Q?MART=CDN?= <SABIDO> writes:
FrSa> Hello. I am a student from Spain. We are working on 'R' (a
FrSa> programming environment for data analysis and graphics). Our
FrSa> teacher has told as to make a job about tests in non complet rank
FrSa> linear regresion models (I hope you could understand
2005 Dec 12
0
marginal effects in glm's
Hi,
I wonder if there is a function in (some package of) R which computes
marginal effects of the variables in a glm, say, for concretness, a
probit model. By marginal effects of the covariate x_j I mean
d P(y=1 | x),
which is approx
g(xB)B_j dx_j
where g is the pdf of the normal distribution, x is the vector of
covariates (at some points, say, the mean values) and B is the estimated
2004 Mar 31
0
energy 1.0.1
R Users,
We would like to announce that Version 1.0.1 of the energy package is
now available on CRAN.
The energy package introduces a new class of statistical tests based
on the concept of Newton's potential energy. Included in the package are
* mvnorm.etest (test) and mvnorm.e (statistic)
A rotation invariant multivariate goodness-of-fit test,
implemented for testing