Displaying 20 results from an estimated 7000 matches similar to: "Help with adding points to allEffects plot"
2010 Jun 17
1
Problems using allEffects() (package effect)
Dear R users,
I have some trouble using the allEffects() function to compute and
display effect plots for a linear model.
My data is quite simple, it concerns effects of 3 treatments on the
tumoral volume of mice. vTum codes for the qualitative initial volume,
from small to big, temps is the time in month since beginning of
treatment, and S?rie codes for the batch. Data is unbalanced.
>
2009 Feb 10
1
Putting values and axis X labels on the charts based on allEffects
Dear everybody!
Need help with graphics. I am runnig a simple lm and then using
allEffects from 'effects' package:
require(effects)
model<-lm(Y~A+B, data=mydataframe)
I am trying to build (for each predictor - A and then B) a plot of means on Y.
I was successful doing it like this - in one swoop:
ml.eff<-allEffects(ml1, se=F)
plot(ml.eff,ylab="Title of Y")
Is it
2011 May 26
2
Plot binomial regression line
Dear all,
I am quite new with R and I have a problem with plotting a binomial
regression line in a plot.
This is what I type in:
> model<-glm(Para~Size,binomial)
> par(mfrow=c(1,1))
> xv<-seq(3.2,4.5,0.01)
> yv<-predict(model,list(area=xv),type="response")
> plot(Size,Para)
> lines(xv,yv)
The error message that I get is:
> Error in xy.coords(x, y) :
2009 Jun 02
0
allEffects() with lm
Dear John Fox and everyone,
I have been using the effects library with glms and have found it very
useful.
Now I'm trying it with lms and I'm not sure if the results of the
allEffects() are as expected.
I've got a model that looks like this:
mymodel = lm(formula = A ~ B + C + D + B:D + C:D)
Residuals:
Min 1Q Median 3Q Max
-3.80156 -0.73486 -0.09792
2012 Jun 04
1
Plotting with Rgraphviz
Hi All,
After a lengthy battle just to get the package installed, I am not able to
actually use Rgraphviz to generate any plots. I tried just using the sample
code in the documentation
(http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/rgraphviz/)
and I get the following:
*> > library(Rgraphviz)
> test.matrix<-matrix(rep(c(0,1,0,0), 9), ncol=6, nrow=6)
>
2006 Jan 21
1
Bug in xy.coords() or documentation error?
Hi,
I noticed the following problem with xy.coords() in R 2.2.1-patched
(version info at the foot of this email) and R 2.3.0 unstable
(subversion no: r37123):
> xy.coords(x = matrix(1:20, ncol = 2))
Error in xy.coords(x = matrix(1:20, ncol = 2)) :
argument "y" is missing, with no default
> xy.coords(x = matrix(1:20, ncol = 2), y = NULL)
$x
[1] 1 2 3 4 5 6 7 8 9
2011 Feb 21
2
(no subject)
What is plot.new? and how can i get it to work so i can load other data?
> library(splancs)
> area = 6*4
> lambda = 1.5
> N = rpois(1,lambda*area)
> u = runif(N,-2,4)
> v = runif(N,0,4)
> plot(u,v,asp=1)
> h = chull(u,v)
> h = c(h,h[1])
> plot(u[h],v[h],"1",asp=1)
Error in plot.xy(xy, type, ...) : invalid plot type '1'
>
2010 Oct 02
1
Possible Bug in Effects Package
Dear List,
I find Effects package very useful, but I believe I have found a bug in
allEffects function. Please consider the following code:
test <- data.frame(tries= round(runif(40, 5, 300)),
tra = gl(4, 10, labels = c("V", "D", "C", "L")),
prop= runif(40, 0, 1))
test$success <- round(with(test, tries*prop))
test$prop <- with(test,
2001 May 04
1
scoping error in xy.coords (PR#932)
Hola!
> rm(list=ls(all=TRUE))
> x <- 1:20
> y <- 1+x+rnorm(x)
> xy.coords(y ~ x,NULL)
... expected output, correct, but when called from inside lowess:
> lowess(y ~ x)
Error in xy.coords(x, y) : x and y lengths differ
> debug(xy.coords)
> lowess(y ~ x)
debugging in: xy.coords(x, y)
... long listing deleted
if (is.language(x)) {
if (inherits(x,
2005 Dec 31
1
xy.coords
In ?xy.coords it says:
If 'y' is missing and 'x' is a
formula: of the form 'yvar ~ xvar'. 'xvar' and 'yvar' are used as
x and y variables.
list: containing components 'x' and 'y', these are used to define
plotting coordinates.
time series: the x values are taken to be 'time(x)' and the y
2006 Jun 04
4
xy.coords(MATRIX) bug in code or documentation (PR#8937)
Hi, people.
xy.coords() does not behave like its documentation says, when given some
matrices. ?xy.coords says:
If 'y' is 'NULL' and 'x' is a [...] formula [...] list [...]
time series [...] matrix with two columns [...]
In any other case, the 'x' argument is coerced to a vector and
returned as *y* component [...]
Now, consider this short
2012 Apr 01
1
Error in xy.coords(x, NULL, log = log) : (list) object cannot be coerced to type 'double'
Hi there,
When I run the code below I get the error
Error in xy.coords(x, NULL, log = log) :(list) object cannot be coerced to
type 'double'
Any tips how I can resolve this?
>
> library("waveslim")
>
> vols=read.csv(file="C:/Users/ocuk/My Documents/Abs Vol.csv", header=TRUE,
> sep=",")
> x<-c(vols[,1])
> #x
> #data(ibm)
>
2008 Oct 23
3
xy.coords in text
Hello,
I want to add text annotation about correlation on "pairs" plots. I
found that I could pass a function to the "panel" argument of pairs :
panel.annot <- function(x, y, ...) {
points(x, y, ...)
c <- cor.test(x, y)
legend("topleft", legend=substitute(rho == r, list(r=sprintf("%.2f",
c$estimate))), bty="n")
}
And then :
2009 Jun 06
1
large numbers of observations using ME() of spdep
Dear All,
We aim to remove the spatial structure of our data using Moran Eigen
Vectors and spdep package . Our data has 3694 samples and 13
variables.
The computer stop working after almost 4 days of processing (we found
it emitting a sharp sound and with all colors on the screen. No
wories, it was restared without problem!). And we are left with
nothing: no result file was produced since the
2017 Nov 11
1
effects package x axis labels
Dear All,
probably a simple enough solution but don;t seem to be able to get my head around it...example based on a publicly available data set:
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
mylogit <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial")
library(effects)
plot(allEffects(mylogit)
? ?
2011 Feb 21
2
(no subject)
What is plot.new? How can I fix this data or add plot.new so it works?
> library(maps)
> library(splancs)
> area = 6*4
> lambda = 1.5
> N = rpois(1,lambda*area)
> u = runif(N,-2,4)
> v = runif(N,0,4)
> plot(u,v,asp=1)
> h = chull(u,v)
> h = c(h,h[1])
> plot(u[h],v[h],"1",asp=1)
Error in plot.xy(xy, type, ...) : invalid plot type '1'
>
2009 Aug 07
3
How do I plot a line followed by two forecast points?
Good day all,
I'm trying to plot a continuous line plot, which is followed by two
forecast points eg. one forecast point is 12 months out, and another
24 months out from the last date of the line plot.
In my attempts so far, the second plot (the forecast points) is scaled
against a new axis scale, thus the two plots are not directly
comparable (I need the forecast points to be scaled
2012 Jun 19
1
help with xy.coords(x,y)
i am working on the project to analyze hedge fund performance, i would
appreciate that if you guys could spare some time helping me out with the R
code. Thanks.
The senario is:
i applied BOXPLOT() to plot the performance of all hedge funds with 7
strategies.
And right now in this boxplot I need to plot the points of 30 individual
hedge funds from my portfolio. And I applied POINTS() and
2011 Jun 16
1
Scatter plot produces "'x' and 'y' lengths differ"
Hello,
I am working on a project to create some scatter plots. I have syntax
for 26 plots, and 22 of them display as they should. But here, for
example, is a sample of the command syntax I am using:
good <- complete.cases(affect1,adh1scr)
plot
(jitter(affect1,2.0),jitter(adh1scr,1.0),xlim=c(1,35),ylim=c(1,35),pch=1
6,
main='Adherence Score by Affectiveness Level - Visit 1',
2007 Dec 14
1
segfault isoreg with NAs
Dear list,
As can be seen below, adding a NA to the y values
in a call to isoreg results in a segfault.
ir4 <- isoreg(1:10, y4 <- c(5, 9, 1:2, 5:8, NA, 8))
Adding missing values to the x values, on the contrary,
gives an error, but maybe the error message could be
tailored to this particular situation.
y <- c(5, 9, 1:2, 5:8, 3, 8)
x <- c(1:9, NA)
isoreg(x, y)
## error message: