Displaying 20 results from an estimated 6000 matches similar to: ""Local trend surfaces" Ex from V&R MASS"
2003 Jul 21
3
Contents of R-help digest.-contouring
R- Users:
Can someone indicate what I am during wrong? This is a script essentially from
Venerable & Ripley's text on interpolating a surface with loess function but I can not get it to run.
Thanks.
John Lewis
Professor
McGill University
Montreal
library(MASS)
library(modreg)
data(topo)
par(mfcol=c(2,2), pty="s")
topo.loess <- loess(z ~ x * y, topo, degree=2,
2003 Dec 30
1
Mistake with contour...
I'm reading Ripley-Venables "Modern Applied Statistics with S - Fourth edition" , at the same time trying the examples proposed in the book using R 1.8.1 under linux.
Now I'm trying the following code from the book (example code of spatial statistics at page 76) with R :
| data(topo) library("spatial") topo.loess<-loess(z ~ x * y, topo,
| degree= 2,span=0.25)
|
2007 Feb 08
1
Point estimate from loess contour plot
Hi,
I was wondering if anyone knows of a way by which one can estimate values
from a contour plot created by using the loess function? I am hoping to
use the loess contour plot as a means of interpolation to identify
the loess created values at points at pre-defined (x,y) locations.
Could anyone point me in the right direction please?
Thanks.
Laura Quinn
Institute of Atmospheric Science
School
2012 May 03
2
Finding local maxima on a loess surface
If a run a LOESS model and then produce a smoothed surface: Is there any
way to determine the coordinates of the local maxima on the surface?
[[alternative HTML version deleted]]
2009 Sep 05
8
Color index in image function
Dear All,
I was looking for the color index in?image function,?such as from topo.colors(n) and etc. but still never found it. For instance, from the help menu.
###########################################
# Volcano data visualized as matrix. Need to transpose and flip
# matrix horizontally.
image(t(volcano)[ncol(volcano):1,])
# A prettier display of the volcano
x <- 10*(1:nrow(volcano))
y
2004 Jun 07
1
filled.contour - color palette so z=0 ONLY is blue
I am trying to create a topographic map of an island - the filled.contour
function works fine except i am experiencing difficulty trying to
represent the sea properly. Basically I want the default colour blue for
any instance where z=0, if I simply use the default topo.color I get
shades of blue for z values up to 220 metres. Is there a way in which I
can specify terrain.color for all values of
2012 Jul 30
1
problem plotting in a grid
Hi all,
I'm trying to generate a grid of four plots. The first 2 appear
just fine, but the final 2 will not appear in the grid, instead
overwriting the first two. Any ideas on how to get them all in the
same window would be greatly appreciated.
Cheers,
Jonathan
library(fields)
par(mfrow=c(2,2)) #2x2 plot windows
plot(c(2,4),c(2,2)) # works fine
plot(c(2,4),c(2,2)) # works fine
2003 Apr 29
1
polynomial fitting
I'm trying to find a way to fit a polynomial of degree n in x and y to
a set of x, y, and z data that I have and obtain the coefficients for
the terms of the fitted polynomial. However, when I try to use the
surf.ls function I'm getting odd results.
> x <- seq(0, 10, length=50)
> y <- x
> f <- function (x, y) {x^2 + y}
> library(spatial)
> test <-
2009 Oct 09
4
Satellite ocean color palette?
Dear List,
Is there a color palette avaliable similar to what is used in satellite ocean color imagery? I.e. a gradient with blue on one end and red on the other, with yellow in the middle? I have tried topo.colors(n) but that comes out more yellow on the end. I am looking for something similar to what is found on the CoastWatch web page:
2002 Jun 08
3
contour plot for non-linear models
Hello all,
I've tried to reproduce the contour plot that appears in the book of
Venables and Ripley, at page 255. Is a F-statistic surface and a
confidence region for the regression parameters of a non-linear model.
It uses the stormer data that are in the MASS package.
I haven't been able to reproduce the plot either in R ( version 1.5 )
and S. It makes the axes and it puts the
2006 Aug 06
1
extractAIC using surf.ls
Although the 'spatial' documentation doesn't mention that extractAIC
works, it does seem to give an output.
I may have misunderstood, but shouldn't the following give at least
the same d.f.?
> library(spatial)
> data(topo, package="MASS")
> extractAIC(surf.ls(2, topo))
[1] 46.0000 437.5059
> extractAIC(lm(z ~ x+I(x^2)+y+I(y^2)+x:y, topo))
[1]
2004 Aug 06
1
: (Lattice): Overlaying more than one trend surface using contourplot() and wireframe()
Hi,
Is there a way to plot more than one trend surface using the functions
contourplot() and wireframe(). I have found an add=T in contour(), but
no equivalent argument in contourplot() and wireframe()?
I have taken the example 11-2 (pages 441-451) from Design and analysis
of experiments (Montgomery 2001, 5th edition) to see if this could be
done in R. I have managed to plot individual
2006 Jan 07
2
need palette of topographic colors similar to topo.colors()
Dear useRs,
I got stuck trying to generate a palette of topographic colors that
would satisfy these two requirements:
- the pallete must be 'anchored' at 0 (just like on a map), with
light blue/lawn green corresponding to data values close to 0 (dark
blue to light blue for negative values, green-yellow-brown for
positive values)
- the brown must get darker for higher positive
2013 Dec 12
1
Heatmap, and heatmap.2 gave different figures for the same dataset
I have a huge dataset(15k X 18) and tried to use the heatmap in R to examine the patterns. However, I found that heatmap and heatmap.2 gave me completely different outputs.
Here are the codes:
------------
> dim(as.matrix(data.dcpm))
[1] 15462??? 18
>
> heatmap(as.matrix(data.dcpm), col=topo.colors(100))
> heatmap.2(as.matrix(data.dcpm), col=topo.colors(100), key=TRUE,
2004 Aug 14
2
VVDQ : GPS/topo-map software?
Can anyone please hazard a guess at an estimate for a poor old squirrel
hunter with a Very Very Dumb Question? Is wine likely to be able to
install and run any of the proprietary GPS-interfacing topo map programs
(DeLorme, Garmin, Mapquest, et al.) at any roughly predictable future
date? The season opens in three weeks, my GPS (Garmin's etrex vista) is
full -- and it still contains road maps
2009 Nov 23
1
Natural colours for topographic data
Dear list members
I'm currently working on some topographic (elevation) data, and was
somewhat surprised that the 'topo.colors' and 'terrain.colors' are of
little to no use here.
The problem is that these functions only return a palette of colours;
they don't map depth values to colours. So if I plot (using 'image',
'persp' or similar functions) and
2004 Nov 04
2
help with wine and TOPO!
Hello all,
The subject line is a little ambitious, although that is my ultimate goal,
to be able to run the National Geographic TOPO! program to look at maps
of Arizona and California on my laptop using only Linux. I don't even
own a copy of Windows, nor do I desire to, so hopefully Wine will be my
friend.
So far it isn't though. I haven't even got as far as trying to run TOPO!
I
2003 May 29
1
surfaces and digital terrain model
Dear all,
I have computed a digital terrain model from a set of points (x, y, z)
using the function interp() in package akima. I want to predict flooded
surfaces given target values of z. I can display the flooded surfaces
with contour() or image(), but I don't know how to get the polygons
delimiting the surfaces. Did anyone write a function for this purpose ?
Best regards,
Renaud
--
2012 Feb 06
5
Colors vector based on group
Hi everyone.
I have a vector like this:
x =
c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2)
I would like to associate a colour to each of these entry. For example, I
could use /topo.colors(3)/ (since I have 3 groups).
I know it is easy to do this with /if/else/ statements, but I would like to
find a proper way to do this.
Thanks in advance,
Phil
--
View
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