similar to: Kernel smoothing ("ks" package)

Displaying 20 results from an estimated 5000 matches similar to: "Kernel smoothing ("ks" package)"

2012 Jul 19
1
3-d kernel smooth by the "kde" function
Dear R community, I'm having hard time to understand the kde function in "ks" package. Let me use a 3-dimensional kernel smooth example to explain my question using the elevation data in geoR. ### here is what I did ### library(ks) require(geoR) data(elevation) elev.df <- data.frame(x = elevation$coords[,"x"], y = elevation$coords[,"y"], z = elevation$data)
2012 Jul 12
1
identifying local maxima
Dear R users, I have created a Loess surface in R, in which x is relative longitude by miles, y is relative latitude by miles, and z is population density at the neighborhood level. The purpose is to identify some population centers in the region. I'm wondering if there is a way to determine the coordinates (x,y) of each center, so I can know exactly where they are. Let me use the
2010 May 04
3
Kernel density estimate plot for 3-dimensional data
Hi! I have a problem with Kernel density estimate plot for 3-dimensional data in ks-package. Here the example: # load ks, spatstat # three-dimensional kernel density of B B <- pp3(runif(300), runif(300), runif(300), box3(c(0,1))) x <- unclass(B$data)$df H <- Hpi(x) fhat <- kde(x, H=H) plot(fhat) plot(fhat, axes=FALSE, box=FALSE, drawpoints=TRUE);
2011 Mar 25
1
spatial stats - geoR - variogram - standard deviation
Hello, I am attempting to get the standard deviation in multiple distance bins in my spatial data. It appears as though the 'variog' command in the geoR package will do the trick, as one of the outputs from 'variog' is 'variog$sd', which, according to the manual, is the "standard deviation of the values in each bin". However, when I run this command, the
2012 Oct 10
3
RGL package surface plot
I'm completely new at R... I have sinkhole survey data (lat, long, and elevation) and have been trying to plot a rotatable 3d plot for several hours... cannot get it right. Examples I see tend to be grid data (one elevation value per grid cell); however, my data are more random (known elevations at known (but random) x-y positions). Data format is tab separated, i.e.: lat long
2004 Jan 31
1
about contour - get contour coordinates - exclude area display
Dear all, I wonder about what could actually be possible with the function "contour": 1/ - the definition of contour lines is most often meaningless when the contours are drawn in areas where no real data points exist. It can however happen that irregular distributions lead to more or less irregular clouds of data points. Interpolations (eg: loess regression, GLM, etc...) are however
2005 Dec 13
1
bug in geoR (?)
I've enconuntered this problem with the last cran version of geoR: > library(geoR) > day <- rep(1:2, each=5) > coords <- matrix(rep(runif(10),2), 10, 2) > data <- rnorm(10) > data[1] <- NA > as.geodata(cbind(coords, data, day), realisations=4) as.geodata: 1 points removed due to NA in the data Errore in as.geodata(cbind(coords, data, day), realisations = 4) :
2007 Aug 21
1
Output from while and for loop
Hello, I am new and am having a hard time getting the proper syntax for output from loops. I am working on a simulation to generate a null expectation of bee behavior. Pieces of it work. The part that I am having specific difficulty is in output of a vector from within the while loop that I am using. Basically the simulation works as such: I have a starting point and a neighbor matrix and a
2017 Sep 27
1
need held in r coding.
Need Help in Debugging below script:-------------------------------- dat <- get_majorlandmarks(dat,Dmin,Per) fit_xts <- xts(dat$fit,order.by = dat$Date,frequency = 365) close_xts <- xts(dat$Close, order.by = dat$Date, frequency = 365 ) majorlandmarks_xts <-xts(dat$Close[dat$majorlandmarks==TRUE], order.by = dat$Date[dat$majorlandmarks==TRUE], frequency = 365 ) minorlandmarks_xts
2010 Oct 16
0
Spatstat Tessellation error
Hello R Users, I am trying to do a quadrat count defined by covariate properties in spatstat. I have read my elevation raster into R (from ascii) and converted to class "im" for use in spatstat. Now I have point data of class "ppp" which window is the same extent as the elevation image. I can conveniently plot the image and the points on the image as follows:
2010 Oct 20
0
Spatstat: tessellation problems.
Hello R Users, I am trying to do a quadrat count defined by covariate properties in spatstat. I have read my elevation raster into R (from ascii) and converted to class "im" for use in spatstat. Now I have point data of class "ppp" which window is the same extent as the elevation image. I can conveniently plot the image and the points on the image as follows:
2009 Nov 19
1
loess smoothing
Hello, In reading the loess description I see: span: the parameter alpha which controls the degree of smoothing. The default seems to be 0.75. Would it be possible to expand on this decription so I can avoid trail and error? Can I increase this pass 'span' > 1? Qualitatively to what degree changing this value affects the smoothing of the data? Thank you. Kevin
2008 Aug 15
1
Strange error message from geoR´s likfit () lik. max. func.
ComRades: I am geeting the error message Error in ldots[[which(MET)]] : attempt to select less than one element when I try to fit the geostatistical model with the likfit() function of geoR. I have tried with old data for which likfit() successfully maximised the likelihood in previous versions of geoR, and yet the current version fails. I have tried in Windows Vista and Windows XP (I haven't
2003 Feb 11
2
geoR question from new R user
Hi, I'm a new R user. My goal is to do a variogram using geoR. I started by trying to do the example in the geoR Illustrative Session using my own data. I am able to read in my Ascii data using: D <- matrix(scan("file.dat", n=530*3), 530,3, byrow=TRUE). Then I use: as.geodata(D, coords.col=1:2, data.col=3) to make the object D geodata. I check the descriptive statistics,
2005 Jul 12
1
getting panel.loess to use updated version of loess.smooth
I'm updating the loess routines to allow for, among other things, arbitrary local polynomial degree and number of predictors. For now, I've given the updated package its own namespace. The trouble is, panel.loess still calls the original code in package:stats instead of the new loess package, regardless of whether package:loess or package:lattice comes first in the search list. If I
2010 May 26
1
More efficient way to use ifelse()? - A follow up
# Thanks again to everyone who provided suggestions. # I was curious about which approaches would be the fastest... so a little benchmarking # My approach was by far the worst :) # The approach suggested by Duncan Murdoch and Peter Langfelder, based on indexing , was by far the fastest (~ 66times faster than using nested ifelse() ). All the details can be found below for those who are
2001 Dec 17
3
smoothing line and a pair of confidence intervals
Hi R Users, I am very new to R and would like to do something quick if possible, please help! Suppose I have a data set of y versus x, how can I generate a smoothing line of y versus x (for example, using loess) and at the same time, generate a pair of confidence intervals for the smoothing or mean plus/minus standard deviation? Yi Zhu Golder Associates Inc. USA
2012 Jun 19
2
Smoothing a persp graph
Hi, I'm unable to find a way to smooth data for a persp() graph. Example, suppose that I have data x,y,z like this: x <- 1:10 y <- 1:10 k <- 20 z <- outer(x, y, "*") + matrix( k*runif(100, -1, 1), 10, 10) persp(x, y, z, theta = 35, phi = 25) The graph is not very nice. Is there a way to smooth the z data so that at the end the graph would look more like something
2008 Jun 26
0
geoR : Passing arguments to "optim" when using "likfit"
Hi everyone !   I'm am trying to fit a kriging model to a set of data. When I just run the "likfit" command I can obtain the results. However when I try to pass additional arguements to the optimization function "optim" I get errors. That is I want to obtain the hessian matrix so matrix (hessian=TRUE).   Heres a little example( 1-D). Can anyone shed some light?  Where am I
2008 Jun 26
0
geoR : Passing arguments to "optim" when using "likfit"]
Mzabalazo Ngwenya wrote: > Hi everyone ! > > I'm am trying to fit a kriging model to a set of data. When I just run > the "likfit" command I can obtain the results. However when I try to > pass additional arguements to the optimization function "optim" I get > errors. That is I want to obtain the hessian matrix so matrix > (hessian=TRUE). >