Displaying 20 results from an estimated 1000 matches similar to: "Kernel density / weights matrix?"
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
Greetings,
I have the following?
Problem:
Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k.
Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with
their probabilities.
I tried several approaches:
(A) Convolution:
each X_j is approximated with
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
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
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
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
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
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
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
2011 Sep 10
0
npreg: plotting out of sample, extremely large bandwidths
Hello r-help,
I am using the excellent np package to conduct a nonparametric kernel
regression and am having some trouble plotting the results.
I have 2 covariates, x1 and x2, and a continuous outcome variable y. I
am conducting a nonparametric regression of y on x1 and x2. The one
somewhat unusual feature of these data is that, to be included in the
dataset, x1 must be at least as large as x2.
2005 Jun 02
3
How to change all name of variables
Dear R-helpers,
First I apologize if my question is quite simple
I have a large datasets which more 100 variables.
For a research I need to change all name of variables with add one or
more letters on each variables.
For example,
> data(Pima.tr)
> Pima.tr[1:5,]
npreg glu bp skin bmi ped age type
1 5 86 68 28 30.2 0.364 24 No
2 7 195 70 33 25.1 0.163 55 Yes
3 5
2010 Apr 25
1
function pointer question
Hello,
I have the following function that receives a "function pointer" formal parameter name "fnc":
loocv <- function(data, fnc) {
n <- length(data.x)
score <- 0
for (i in 1:n) {
x_i <- data.x[-i]
y_i <- data.y[-i]
yhat <- fnc(x=x_i,y=y_i)
score <- score + (y_i - yhat)^2
}
score <- score/n
2011 Feb 28
1
mixture models/latent class regression comparison
Dear list,
I have been comparing the outputs of two packages for latent class
regression, namely 'flexmix', and 'mmlcr'. What I have noticed is that
the flexmix package appears to come up with a much better fit than the
mmlcr package (based on logLik, AIC, BIC, and visual inspection). Has
anyone else observed such behaviour? Has anyone else been successful
in using the mmlcr
2018 Feb 03
0
Speeding up npreg
Dear all,
I am using npreg from the np library to run a Kernel regression. My dataset
is relatively large and has about 3000 observations. The dependent variable
is continuous and I have a total of six independent variables -- two
continuous, two ordinal and two categorical.
The model converges without problems but it takes a very long time to do so
(nearly one hour).
Is there any way to speed
2005 Mar 18
1
How to show which variables include in plot of classification tree
Dear all
For my research, I am learning classification now.
I was trying some example about classification tree pakages, such as
tree and rpart, for instance,
in Pima.te dataset have 8 variables (include class=type):
library(rpart)
library(datasets)
pima.rpart <- rpart(type ~ npreg+glu+bp+skin+bmi+ped+age,data=Pima.te,
method='class')
plot(pima.rpart, uniform=TRUE)
text(pima.rpart)
2011 Feb 16
1
speed up the code
Hi All,
The following is a snippet of my code. It works fine but it is very slow. Is it possible to speed it up by using different data structure or better solution? For 40000 runs, it takes 8 minutes now. Thanks a lot
fun_activation = function(s_k, s_hat, x_k, s_hat_len)
{
common = intersect(s_k, s_hat);
if(length(common) != 0)
{
index = match(common, s_k);
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
2008 Jul 25
0
Package np version 0.20-0 released to CRAN
Dear R users,
An updated version of the np package has recently been uploaded to CRAN
(version 0.20-0). Version 0.20-0 is documented in
Tristen Hayfield and Jeffrey S. Racine (2008). Nonparametric
Econometrics: The np Package. Journal of Statistical Software 27(5). URL
http://www.jstatsoft.org/v27/i05/
and also in a vignette (vignette("np",package="np")). There is also a
FAQ
2008 Jul 25
0
Package np version 0.20-0 released to CRAN
Dear R users,
An updated version of the np package has recently been uploaded to CRAN
(version 0.20-0). Version 0.20-0 is documented in
Tristen Hayfield and Jeffrey S. Racine (2008). Nonparametric
Econometrics: The np Package. Journal of Statistical Software 27(5). URL
http://www.jstatsoft.org/v27/i05/
and also in a vignette (vignette("np",package="np")). There is also a
FAQ
2003 Sep 24
0
information matrix test in r/s
Greetings, Fellow R-ians:
I'm working with a few different quasi-likelihood formulations for some data
I'm analyzing. I'd like to implement the Information Matrix Test (see,
e.g., White, 1982, or Lancaster, 1984) for each of them to determine which
of the models is more likely. Since the null distribution of the test
statistic is chi-squared, I envision calculating the ordinate of
2005 Jul 05
0
Code of Hansen's (2000) Econometrica paper on threshold estimation
I am searching for an R version of the code written in GAUSS by Bruce
Hansen for his paper on Econometrica, 2000, "Sample Splitting and
Threshold Estimation".
Someone can help me?
Davide
--
Davide Fiaschi
Dipartimento di Scienze Economiche
University of Pisa
Via Ridolfi 10
56100 Pisa (PI)
Italy
Phone/Fax: ++39.050.2216208/++39.050.598040
E-mail: dfiaschi at ec.unipi.it
Homepage: