similar to: abline of an lm fit not correct

Displaying 20 results from an estimated 10000 matches similar to: "abline of an lm fit not correct"

2005 Dec 19
1
How to draw partial grid in plot for spatial-binomial experiment?
DeaR comRades: I have a 2D spatial binomial process as shown in the data and code below. I am plotting the number of trials and the number of successes in the spatial binomial experiments and would like to draw the spatial cells were the trials and successes were counted, i.e. a partial grid in the plot only for those cells where there is a number. The cells are 2x2 km cells. The count of Trials
2008 Aug 28
1
abline of an lm fit not correct
mac osx 10.5.4 R 2.7.1 I have fit a model d<-lm(y~x) with an R^2 of 0.963 but when I issue the command abline(d) the line is below where it ought to be. Looks like the right slope, but not the right intercept. thanks -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large
2006 Sep 01
1
core dump with point.in.polygon
I've been trying to get some code to run on a 64-bit FreeBSD machine running R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.0 (2006-04-24) ISBN 3-900051-07-0 and keep getting a core dump with the following results: *** caught segfault *** address 0x0, cause 'unknown' Traceback: 1: .Call("R_point_in_polygon_sp", as.numeric(point.x),
2012 Oct 18
1
spTransform longlat to utm
Dear all, I am trying to project my LongLat-maps to a plane. The ultimate purpose is to do a search of points in vicinity of other points using overlay-commands (sp) with radius in km. I am applying spTransform (package rgdal) and it gives my some curious results. An example. Let's take a point lying somewhere in Germany, zone=32U x <- 8.968735 y <- 49.454735 After conversion I
2006 Dec 09
1
abline for intercept-only simple lm models (with and without offset)
The abline function can be used to draw the regression line when one passes the lm object as an argument. However, if it's an intercept-only model, it appears to use the intercept as the slope of the abline: mod <- lm(dist ~ 1, data = cars) plot(dist ~ speed, data = cars) abline(reg = mod) # nothing appears This behaves as documented, but might catch someone. Would it be an improvement
2008 Sep 18
2
graphing netCDF files
Hello I'm working with a large hydrological data set stored in a netCDF format. The file stores x and y coordinates in the UTM projected coordinate system, yet when I use image to graphically display the z variable, the image is distorted in the sense that it does not plot the map in the correct spatial organization. I'm wondering if I need to define the projection of the netCDF file
2006 Feb 09
1
converting lat-long coordinates to Albers Conical Equal Area coordinates
#################################################################################### We have used maptools to construct state, county, township, census-tract, and zipcode level R maps with an Albers Conical Equal Area projection. We would like to be able to plot the location of weather stations or other point locations on the maps. The data the point locations are in latitude-longitude units
2010 Sep 20
3
How to set the limit of abline (regression line of lm)
Dear List, I ran a regression model using lm and produced a regression line using abline. The line ranges from -20 to 20 in x axis, and the section I only want is from -20 to 0. Please kindly advise any function in abline () to set the range of x axes. Thank you Elaine [[alternative HTML version deleted]]
2009 Jul 15
3
abline(v= x) in plot with time formated xaxis not working
Hi, I try to create a vertical line in my plot, which has a xaxis comprising time formated data. This is what I tried: ---------------- y<-152833 x<-strptime(y, format="%H%M%S") abline(v=x, col="red") ---------------- for some reason, it doesn't work and no error msg is displayed... I hope someone can tell me what I do wrong, or maybe an alternative. Thanks
2003 Apr 07
1
Segmentation error
Hello, I'm using library(spatstat) and trying to use ppp on my dataset. I get a segmentation error when I try to run it. Any suggestions? Code below ... Thanks, Suzanne --------------------------------------- dat <- read.delim(file="trees_R2.csv", sep=",", header=1) P16 <- (dat$Plot == "P1") | (dat$Plot == "P2") | (dat$Plot == "P3")
2006 Feb 01
1
Gauss-Krüger coordinates system
Dear All, I need to convert some Northing-Easting coordinates from the Gauss-Krüger system into latitude-longitude. Any suggestions on how to do it? Regards, Marco Marco Giannitrapani Statistical Consultant Tel: +44151373 5945 Email: Internet: http://www.shell.com [[alternative HTML version deleted]]
2007 Oct 08
1
do not plot polygon boundaries with spplot {sp}
Hi, Is there a simple way to suppress the plotting of polygon boundaries with spplot() ? # simple list of 12 colors cols <- brewer.pal(12, "Paired") # plot pile of polygons, with 12 classes: spplot(x, zcol='class2', col.regions=cols, scales=list(draw=T), xlab="Easting (m)", ylab="Northing (m)") ... seems to work well. However the polygon boundaries
2006 Jan 20
3
abline() or predict.lm() when log="x"
Hello, I'm trying to plot a fitted lm() line on a plot when the one explanatory variable is log transformed and log="x". I get different lines using abline and predict.lm(). #Example x <- 1:100 y <- rnorm(100) plot(y ~ x, log="x") abline(lm(y ~ log(x))) lines(x, predict(lm(y ~ log(x))), lwd=2) I'm sure I'm missing something but could someone tell me which
2005 Jun 02
4
plot/lm/abline
Hi, when I run > plot.default(z1, z2, xlab = "x", ylab = "y", main = "xxxx", pch = "+") > abline(lm(z1 ~ z2)) then the plot is plotted perfectly (scatterplot), however, the lm() function doesnt appear on the plot. What could be wrong? (Yesterday it worked perfectly, with the lm() line.) Running R 2 on OS X. Mathias Hunsk??r Furevik Norway
2009 Sep 10
1
sppolot: fill below minimum legend value
In the plot below, there are some grid cells that have values below 10, which is the lowest "cut" value I have specified. Is there a way, without adjusting the number of cuts, to tell R to fill in those cells with the lowest possible color (in this case greeen)? There is a white "hole" in the image about a quarter of the way in from the left side, this is what I would like to
2009 Jun 21
1
Incidence Function Model in R help
All: Though I am fairly new to R, I am trying to work my way through J Oksanen's "Incidence Function Model in R" and can't get past some error with my glm arguments. I'm getting through > attach(amphimedon_compressa) > plot(x.crd,y.crd,asp=1,xlab="Easting",ylab="Northing",pch=21,col=p+1,bg=5*p) > d<-dist(cbind(x.crd,y.crd)) > alpha<-1
2006 Jul 24
1
Memory exceeding for split
Hi R-users I'm working with a data.frame of 40000 x 10, for which I need to apply the "split" function. The result is very long and cannot be stored in a variable due to memory exceeding. I've tried to send the result directly to a file through sink(filename) function, but the problem still occurs. Does anyone have an idea to solve this issue? > dim(dados) [1] 40000 10
2002 May 03
1
copy or save of plots (PR#1507)
On Fri, 3 May 2002 drew.tyre@csiro.au wrote: > Full_Name: Drew Tyre > Version: 1.4.0 > OS: Win 2000 > Submission from: (NULL) (140.253.74.225) > > > When creating a rather complex plot, the resulting figures 'shrink' when either > copied to the clipboard or saved as a metafile using the GUI menu. Also saving > as postscript or pdf causes the same problem, as
2002 May 03
0
copy or save to metafile from graphics device shrinks plots (PR#1507)
Full_Name: Drew Tyre Version: 1.4.0 OS: Win 2000 Submission from: (NULL) (140.253.74.225) When creating a rather complex plot, the resulting figures 'shrink' when either copied to the clipboard or saved as a metafile using the GUI menu. Also saving as postscript or pdf causes the same problem, as does printing the figure directly from the graphics window. Only the figure areas shrink,
2005 Nov 09
1
using abline and a fitted 2nd degree formula
Hello all, R2.1.1, Wk2 I am doing some two-step plotting, first using plot() to illustrate the datapoints and then using abline() to place a trend line from a fitted model into the plot. Everything works well as long as the formula of the fitted model i of the type: m1 <- lm(Dependent ~ Independent) then abline(m1) puts the proper straight line into the plot. But if I use: m2 <-