search for: npuden

Displaying 7 results from an estimated 7 matches for "npuden".

Did you mean: npudens
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) vect...
2010 Nov 14
1
R package 'np' problems
Hi List, I'm trying to get a density estimate for a point of interest from an npudens object created for a sample of points. I'm working with 4 variables in total (3 continuous and 1 unordered discrete - the discrete variable is the character column in training.csv). When I try to evaluate the density for a point that was not used in the training dataset, and when I extract the...
2009 Dec 14
0
Confused on using expand.grid(), array(), image() and npudens(np) in my case
Hi all, I want to use the npudens() function in the np package (multivariate kernel density estimation), but was confused by the several functions in the following codes,expand.grid(),array(),image() and npudensbw(). This confusion will only be generated in >=3 dimensions. I marked the four places with confusion1-4. I think t...
2009 Jul 24
0
xlim and ylim on npudens (np package)
...ith R, specifically needing to plot some 3D joint distribution functions estimated from data. Happily, the "np" package includes example code which gets most of the way there. The following tweak of the doc code gives me a nice cdf: library(np) library(datasets) data(faithful) f <- npudens(~eruptions+waiting,data=faithful) plot(f,cdf = TRUE, xtrim = -0.2, view = "fixed", main = "") ...but I'm currently stuck on how to set the x and y limits of this plot. It seems that xlim and ylim should be what I need, but the following doesn't affect the limits: pl...
2010 Nov 19
1
Sampling from multi-dimensional kernel density estimation
Hi, I'd like to use a three-dimensional dataset to build a kernel density and then sample from the distribution. I already used the npudens function in the np package to estimate the density and plot it: fit<-npudens(~x+y+z) plot(fit) It takes some time but appears to work well. How can I use this to evaluate the fitted function at a certain point, e.g. (x=1, y=1, z=1)? Does R provide methods for sampling from the fitt...
2010 Apr 07
0
exporting rotating plot into Powepoint
Hi, I need to export a rotating plot like the one generated from the following function into a PPT slide or something that can be viewed by reviewers of a journal: library(np) library(datasets) data(faithful) f <- npudens(~eruptions+waiting,data=faithful) plot(f,view="rotate",neval=100,phi=30,main="",xtrim=-0.2) Thanks! Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical Oncology and Hematology, University of Genova, Genova, Italy Guest Researcher, LMP, NCI, NIH, Bethesda MD Work...
2010 Nov 03
0
package 'np' and point estimation with multiple predictors
...1,P2,P3 for about 700 total points), and then predict R1 for a new set of data for which I have all the predictors. Simple, no? I understand how to calculate bandwidths, and I have a kind of bastardized way of getting the conditional distribution, i.e., f(R1|P1=0.8,P2=0.2,P3=2) using fitted(npudens(bw=bw,edat=newdata)) evaluating over a vector of R1. I have then been using this "density" to get a maximum likelihood estimator of R1- I have no idea if that is really valid, and if anyone wants to yell at me go ahead, I want to do this the correct way and I'm sure I'm maki...