similar to: Kernel Density Estimation at manually specified points

Displaying 20 results from an estimated 270 matches similar to: "Kernel Density Estimation at manually specified points"

2003 Sep 26
2
performance question
Hi, I am about to write functions for multivariate kernel densitiy estimation with mixed categorical and continuous date (accoring to Jeff Racine and Qi Li), and the leave-one-out window esitmation needs a lot of computation. I am now optimizing the code performance and therefore fhe following questions: As R uses call-by-value for functions, is it computational expensive to pass large matrices
2007 May 01
2
Simulation using parts of density function
Hi My simulation with the followin R code works perfectly: sim <- replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12)))) But now I do not want to have values in object "sim" exceeding 5'000'000, that means that I am just using the beginning of densitiy function gamma x < 15.4. Is there a possibility to modify my code in an easy way? Thanks for any help!
2007 Apr 02
3
Random number from density()
Hello, I'm writing some genetic simulations in R where I would like to place genes along a chromosome proportional to the density of markers in a given region. For example, a chromosome can be presented as a list of marker locations: Chr1<-c(0, 6.5, 17.5, 26.2, 30.5, 36.4, 44.8, 45.7, 47.8, 48.7, 49.2, 50.9, 52.9, 54.5, 56.5, 58.9, 61.2, 64.1) Where the numbers refer to the locations of
2010 Feb 05
1
Using coxph with Gompertz-distributed survival data.
Dear list: I am attempting to use what I thought would be a pretty straightforward practical application of Cox regression. I figure users of the survival package must have come across this problem before, so I would like to ask you how you dealt with it. I have set up an illustrative example and included it at the end of this post. I took a sample of 100 data points from each of two populations
2012 Jul 17
1
about different bandwidths in one graph
Thank you in advance. Now I want to make comparison of the different bandwidth h in a normal distribution graph. This is the table of bandwidth h: thumb rule (normal)--0.00205; thumb rule(Epanech.)--0.00452; Plug-in (normal)--0.0009; Plug-in(Epanech.)--0.002. this is the condition: N=1010 data sample is from normal distribution N(0,0.0077^2). The grid points are taken to be [-0.05,0.05] and
2016 Apr 22
1
npudens(np) Error missing value where TRUE/FALSE needed
Hi, I am looking for some help concerning the npudens function in the np package. I am trying to find a kernel density function of a multivariate dataset and the density evaluated at each of the 176 points. I have 2 continuous and 3 ordered discrete variables. My sample size is 176. So edata is a 176x(2+3) data frame, while tdat is a 1x(2+3) vector. bw_cx[i,] is a 1x (2+3) vector
1999 Dec 01
1
density(kernel = "cosine") .. the `wrong cosine' ..
I'm in teaching mode, kernel densities. {History: density() was newly introduced in version 0.15, 19 Dec 1996; most probably by Ross or Robert } When I was telling the students about different kernels (and why their choice is not so important, and "equivalent bandwidths" etc,etc) I wondered about the "Cosine" in my teaching notes which is defined there as k(x)
2010 Jun 01
1
BreastCancer Dataset for Classification in kknn
Dear All, I'm getting a error while trying to apply the BreastCancer dataset (package=mlbench) to kknn (package=kknn) that I don't understand as I'm new to R. The codes are as follow: rm = (list = ls()) library(mlbench) data(BreastCancer) library(kknn) BCancer = na.omit(BreastCancer) d = dim(BCancer)[1] i1 = seq(1, d, 2) i2 = seq(2, d, 2) t1 = BCancer[i1, ] t2 =
2008 Feb 07
1
User-defined Kernels
Hi, i would like to do a local linear regression but with a user-defined function f(x,y) as kernel. (not the typical Gaussian or Epanechnikov kernel function but some similar function). More, would it be possible to do a local linear regression by adding weights to the (x,y) data points? Many thanks in advance. -- View this message in context:
2009 Jun 03
0
Treated - KernSmooth pckg - dpik function gives numeric(0) for kernel="epanech"
Epanechnikov kernel works if option canonical=TRUE, however it would be good to know why it does not for for canonical=FALSE (default). Sorry for craetaing maybe useless thread. Best regards, Ondra. [[alternative HTML version deleted]]
2011 Jul 20
0
np package, KleinSpady estimator, error when I estimate the bootstrapped standard errors
Dear all, I am using np package in order to estimate a model with Klein and Spady estimator. To estimate the model I use KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2) and to estimate beta hats standard errors I use KSi <- npindex(KS, gradients=T, boot.num=300) vcov(KSi) This is
2011 Jul 25
0
error in optimization when I include constant term in Klein and Spady (np package)
Dear all, I am trying to use the np package for the estimation of a model with Klein and Spady's semiparametric estimator. When though, I include a constant term ( a column with 1s in X) then the following message appear: Multistart 1 of 3...Error in optim(c(beta, h), fn = optim.fn, gr = NULL, method = optim.method, : non-finite value supplied by optim So, how can I include a constant
2010 Jul 24
0
local polynomial with differnt kernal functions
Hi, R users   I need to use the function (locpoly) to fit a local poynomial regression model, The defult for kernal function is " normal" , but  I need to use different kernal functions such as :Uniform,Triangular,Epanechnikov,...... Could someone help me define these functions to fit local polynomial regression model?. Email:assaedi76@yahoo.com     Thanks alot [[alternative
2005 May 12
0
Package adehabitat version 1.3
Dear all, I have just uploaded to CRAN the version 1.3 of the package 'adehabitat'. Significant changes are listed below: - Several functions allowing the conversion from and to classes of the package sp have been added. Maps of class "asc", "kasc", "area", as well as radio-monitoring of class "traj" can now be converted to the spatial
2005 May 12
0
Package adehabitat version 1.3
Dear all, I have just uploaded to CRAN the version 1.3 of the package 'adehabitat'. Significant changes are listed below: - Several functions allowing the conversion from and to classes of the package sp have been added. Maps of class "asc", "kasc", "area", as well as radio-monitoring of class "traj" can now be converted to the spatial
2011 Jan 26
0
baseline hazard function
Dear colleagues, I have the following dataset. It is modelled on the data included in Box-Seteffenheiser and Jones "Event History Modelling" Using the following code, I try to find the baseline hazard function haz_1<-muhaz(bpa$time, bpa$censored, subset=(bpa$year=="2010" | bpa$ban=="1"), min.time=1, max.time=3) I think I'm doing everything right, but what I
2011 Jul 18
0
np package, estimating the standard errors of Klein and Spady's estimator
Dear all, I would like to estimate the standard errors of Klein and Spady's estimator for that I am using: library(np) N<-100 X<-matrix(c(rnorm(N,1,1), rnorm(N,0,1)), ncol=2) BETA <-matrix(1,2,1) Z<-X%*%BETA L<-rlogis(N,location=0, scale=1) Y <-as.vector(X%*%BETA+L>=0)*1 KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady",
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
2007 May 03
0
unscrible pls
On 5/2/07, r-help-request@stat.math.ethz.ch < r-help-request@stat.math.ethz.ch> wrote: > > Send R-help mailing list submissions to > r-help@stat.math.ethz.ch > > To subscribe or unsubscribe via the World Wide Web, visit > https://stat.ethz.ch/mailman/listinfo/r-help > or, via email, send a message with subject or body 'help' to >