Displaying 20 results from an estimated 3000 matches similar to: "A question on the abline function"
2012 Mar 29
1
abline with xyplot does not work
I am trying to plot the results of a random effects model where each subject is allowed to have his, or her, own intercept. I use xyplot to plot the data, lme to compute the regression and then try to put a summary regression line on the xyplot. As can be seen by the output pasted below, I am getting an error message,
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
(list)
2009 Jul 13
2
Problems in plotting with abline
Dear R-users,
I am using R(a package igraph) to calculate certain
topological features of networks. When I try to draw a plot between these
features I get an error. Following is the code I am using :
*> plot(met_eco_deg,met_eco_bet)
> lmout<-lm(met_eco_bet ~ met_eco_deg)
> abline(lmout)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new
2010 Nov 20
10
An empty grey diagram
Hi folks,
Win7 64bit
R 1.12.0
I run following command on R:-
> ToothGrowth
> attach(ToothGrowth)
> plot(dose,len)
> matrics=lm(len~dose)
> abline(metrics)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
Only a grey diagram is displayed without content
> plot(abline(metrics))
Error in int_abline(a = a, b = b, h = h, v
2009 Apr 01
2
Plotting multiple ablines
I really want to do this:
abline(
a=tan(-kT*pi/180),
b=kY-tan(-kT*pi/180)*kX
)
where kX,kY and kT are vectors of equal length. But I can't do that
with abline unless I use a loop, and I haven't figured out the least
unelegant way of writing the loop yet. So is there a way to do this
without a loop?
Or if I am to resort to the loop, what's the best way of doing it
considering that I
2008 Aug 05
2
qqline function doesn't plot
I have a data vector x. When I try
qqline(x)
I get the following error:
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
And a blank plot appears.
Can anybody help? What am I doing wrong?
Thanks,
Scotty
_________________________________________________________________
Contest
[[alternative HTML version deleted]]
2008 May 02
1
A horizontal or vertical line draw on mosaic plot?
Hi,
I want to have a horizontal line on a mosaic plot with "vcd" package.
This would give me an idea where is 0.5 proportion in a cell. Using
"mosaicplot" function of "graphics" package, I can draw a line using
"abline." But, with "mosaic" function of "vcd" package, I have tried
to use "abline" function, which complains
2009 Apr 28
2
effects package --- add abline to plot
Hello, I am not having success in a simple task. Using the effects package, I would like to add reference lines at probability values of 0.1 – 0.6 on a plot of the effects. The plot command works, but following up with an abline command produces the message “plot .new has not been called yet”, and of course the reference lines were not added.
Looking through past R help lists, there was a
2010 Mar 22
1
Using dev.copy
I'm working over an ssh connection without X11 graphics. I'm making a
plot, the first stage of drawing which takes a long time. I want to
experiment with adding details. Here is what I was hoping to do, which
results in error.
## Draw the master plot on png dev 2
png(file="master.png")
plot(1:10)
## Save a copy on png dev 3
png(file="copy1.png")
dev.set(2)
2008 Jun 12
1
adding horizontal lines to a trellis plot
I would like to add two horizontal lines representing acceptible drug levels to a trellis plot.
I tried using abline and I get an error that "plot.new has not been called." See below.
xyplot(FK~WEEK|Event1/MRN, data=FKdat.o1)
abline(h=5)
abline(h=10)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
Any help that can be provided
2002 Jan 05
1
abline and log plots (PR#1243)
Full_Name: Stephen Eglen
Version: 1.4
OS: Redhat Linux 7.1
Submission from: (NULL) (128.252.204.36)
abline() produces a spurious line in addition to the correct line, at least with
the X11 driver. The postscript file generated also has nan values in it, which
causes an error under ghostscript.
xs <- c(0, 150, 300)
ys <- c(75, 40, 23)
par(mfrow=c(1,2))
plot(xs,ys, log="")
2010 Nov 10
1
log-transformed linear regression
Hello,
I have a basic question. Sorry if it is so evident....
I have the following data file :
http://ekumen.homelinux.net/mydata.txt
I need to model Y~X-1 (simple linear regression through the origin) with
these data :
load(file="mydata.txt")
X=k[,1]
Y=k[,2]
aa=lm(Y~X-1)
dev.new()
plot(X,Y,log="xy")
abline(aa,untf=T)
abline(b=0.0235, a=0,col="red",untf=T)
2004 Mar 08
5
abline
if I want to specify y-coordinates for the heights of horizontal lines to go across a plot.
x <- c(1,2,3,6,4,8,4,7)
y <- c(3,2,7,4,5,4,5,6)
h <- c(3,5,7)
plot(x,y)
abline(y=h)
However I got error message:
Warning message:
parameter "y" couldn't be set in high-level plot() function
(I tried abline(h=y) , it;s not what I want also)
Do u know why?
2006 Apr 07
1
Multiple ablines
Thanks in advance,
I have searched and read the archives extensively and have been unable
to find a question (solution) exactly mimicking my problem. I have
created a scatterplot simulation of data through which I have drawn a
linear regression in this manner:
points(y~x, pch="*", col="black")
lm(y~x)
fm=lm(y~x)
abline(fm, col="red")
This works. The problem
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
2011 Sep 07
1
linear regression, log-transformation and plotting
Hello,
I've some questions concerning log-transformations and plotting of the regression lines. So far as I know is it a problem to log-transform values smaller than 1 (0-1). In my statistics lecture I was told to do a log(x+1) transformation in such cases. So I provide here a small example to explain my questions:
# Some example data for testing
a1
2007 Nov 19
0
R code for L-moment digram
Dear Sir I am getting errors in using following R code for L-moment ratio
diagram
Help in this regard
> "plotlmrdia" <-
+ function(lmr,
+ nopoints=FALSE,
+ nolines=FALSE,
+ nolimits=FALSE,
+ nogev=FALSE,
+ noglo=FALSE,
+ nogpa=FALSE,
+ nope3=FALSE,
+ nogno=FALSE,
+ noexp=FALSE,
+ nonor=FALSE,
+
2010 Jun 11
2
Misplacement of Greek letter
Hello.
I am trying to get my axis label to read as follows
(The symbol) Delta AUC blah blah...
then below it...(some other text)
The problem is the Delta symbol shows up beside the "(some other text)"
rather than the "AUC". Does any one know how I can get the Delta to remain
beside AUC?
Here is the actual command should you care to look at it.
par(mar=c(8,8,4,4))
2004 Mar 03
3
Adding text (coefts) to pairs panels
Hi,
First of all, thanks for the efforts of all the developers and contributors
- I'm very new to R and at the moment am just using it to create some
graphics, but it seems to be quite powerful.
I've googled the archives and wasn't able to find anyhting that dealt with
this problem, so would appreciate any suggestions/tips.
In a pairs plot I'd like to plot a linear regression line
2014 Mar 04
4
Questions on letor module
Hi,
I have several questions regarding the letor module,I looked at the
framework of learning to rank in xapian
http://rishabhmehrotra.com/gsoc/17.png, I am a little confused. Why using
deep learning to find unsupervised features in test data? Since in my
understanding, learning to rank model usually learn features from the
training data then apply the model to the test data? Why test set and
2007 Nov 01
2
problem with log axis
Hello,
if I do:
x <- c(0.5,1,3,6,10,20,40)
y <- 10-log(x)+rnorm(7,0,0.05)
r1 <- lm(y ~ log(x))
plot(log(x),y)
abline(r1)
#
I get a nice plot with the regression line almost over the points.
but:
plot(x,y,log="x")
abline(r1)
gives me exactly the same plot for the points but the regression line
is completely off !
I would like the plot with the real values of X on