search for: rkern

Displaying 5 results from an estimated 5 matches for "rkern".

Did you mean: kern
2004 Nov 13
3
density estimation: compute sum(value * probability) for given distribution
...; length(cap) [1] 200 > summary(cap) Min. 1st Qu. Median Mean 3rd Qu. Max. 459.9 802.3 991.6 1066.0 1242.0 2382.0 I need to compute the sum of the values times their probability of occurence. The graph is fine, den <- density(cap, from=min(cap), to=max(cap), give.Rkern=F) plot(den) However, how do I compute sum(values*probabilities)? The probabilities produced by the density function sum to only 26%: > sum(den$y) [1] 0.2611142 Would it perhaps be ok to simply do > sum(den$x*den$y) * (1/sum(den$y)) [1] 1073.22 ? Thank you, b.
2012 Jul 26
2
density
...very much. Hannah x <- rnorm(1000) > bw.nrd(x) [1] 0.2688588 > bw.nrd0(x) [1] 0.2282763 > bw.ucv(x) [1] 0.2112366 > bw.bcv(x) [1] 0.2890085 Warning message: In bw.bcv(x) : minimum occurred at one end of the range > bw.SJ(x) [1] 0.2716242 > density(x, give.Rkern=T, kernel="gaussian") [1] 0.2820948 > density(x, kernel="gaussian") Call: density.default(x = x, kernel = "gaussian") Data: x (1000 obs.); Bandwidth 'bw' = 0.2283 x y Min. :-3.974672 Min. :0.0000199 1st Qu.:-1.9877...
1999 Dec 15
1
R-0.90.1 is released
...reserved word in C) for R complex objects passed to C. o new function dir.create() for platform-independence. o help.search() creates a database for faster searching later in the R session. o density() allows for more kernels and has a new argument `give.Rkern' to access the relevant kernel property. o multivariate methods for ar: "yule-walker" (now in C) and "burg" (new) contributed by Martyn Plummer. o New data sets `HairEyeColor' (hair and eye color of statistics students), `Titanic' (survi...
1999 Dec 15
1
R-0.90.1 is released
...reserved word in C) for R complex objects passed to C. o new function dir.create() for platform-independence. o help.search() creates a database for faster searching later in the R session. o density() allows for more kernels and has a new argument `give.Rkern' to access the relevant kernel property. o multivariate methods for ar: "yule-walker" (now in C) and "burg" (new) contributed by Martyn Plummer. o New data sets `HairEyeColor' (hair and eye color of statistics students), `Titanic' (survi...
2012 Mar 21
1
enableJIT() and internal R completions (was: [ESS-bugs] ess-mode 12.03; ess hangs emacs)
...n for 'fft' Note: no visible global function definition for 'approx' [1] "x=" "...=" "bw=" "adjust=" "kernel=" "weights=" [7] "window=" "width=" "give.Rkern=" "n=" "from=" "to=" [13] "cut=" "na.rm=" Disabling JIT warnings removes the notes, but the call remains to be extremely slow, as the compiler still processes all the exceptions. Thanks, Vitalie. >>...