Displaying 20 results from an estimated 20000 matches similar to: "problem with plot.lm"
2007 Jan 28
1
plot.lm (PR#9474)
Full_Name: Robert Kushler
Version: 2.4.1
OS: Windows XP
Submission from: (NULL) (69.245.71.40)
In the constant leverage case, plot #5 is not correctly produced.
The labels on the x-axis are sorted correctly by magnitude of the
fitted value, but the data are plotted in the original factor order.
I changed
facval[ord] <- facval
xx <- facval
2018 May 11
0
Bug in plot.lm function (stats package): positioning of labels for extreme points.
Hi,
====================
Reproducible example:
====================
data(Animals, package="MASS") # interesting dataset
# Run model
lm1 <- lm(log10(body)~log10(brain), data=Animals)
# Setup 2x2 graphics device
par(mfrow=c(2,2))
# Plot diagnostics, label the two most "extreme" points based on magnitude of residuals
plot(lm1, id.n=2)
==============================
2003 Mar 03
0
lm, gee and lme
Behavioral science data is often collected from nested structures (students
in schools, in districts, etc.). This can produce nonindependence among
responses from individuals in the same groups. Consequently, researchers
are advised to model the nested nature of the data to avoid biases in SE
estimates.
Failing to account for nonindependence can lead to SE estimates that are too
large or too
2013 Oct 15
1
Q-Q plot scaling in plot.lm(); bug or thinko?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've been looking fairly carefully at the Q-Q plots produced by
plot.lm() and am having difficulty understanding why plot.lm()
is doing what it's doing, specifically scaling the standardized
residuals by the prior weights. Can anyone explain this to me ... ?
Multiplying by the weights seems to give the wrong plot, at least for
binomial
2009 Aug 21
1
problem with plot.lm?
I'm bringing this issue to r-devel as my idea of sending it to r-help
appears to be wrong.
The following is reproducible in R-patched and R-devel (also in older
versions).
An outlier is inserted in group E and the last plot by plot.lm
suggests that the point belongs to D.
It appears to me that:
* (facval, rsp) and
* x$xlevels[[1L]][order(sapply(split(yh,mf[,1]), mean))]
are sorted
2004 Mar 03
1
Bug in plot.lm (PR#6640)
Dear all,
I noticed the following behaviour of plot.lm:
> fm1 <- lm(time~dist, data=hills, weights=c(0,0,rep(1,33)))
> par(mfrow=c(2,2))
> plot(fm1)
Warning messages:
1: longer object length
is not a multiple of shorter object length in: res/(sd * (1 - hat))
2: longer object length
is not a multiple of shorter object length in: (res/(sd * (1 - hat)))^2 * hat
which seems to be
2012 Nov 22
1
How to control plotting formula above lm diagnostic plots?
Dear All,
I am trying to plot four diagnostic plots for my lm in one window.
Here is some random data for an example:
a = rnorm(20, mean=2, sd=0.2)
b = rnorm(20, mean=1, sd=0.4)
model=lm(a~b)
When I set the page as:
par(mfrow=c(1,1), oma=c(1,0,2,0))
and plot my model:
plot(model)
above all four plots the formula lm(a~b) is printed.
What is interesting if I set the page to have two
2012 Mar 30
2
error message in logistic regression
Hi
I am trying to do a logistic regression on a small data file yet when i get
up to plotting the first set of graphs instead of 4 I only get one graph,
and some error messages. Yet it still looks like the program is doing
something due to the "blue wheel" of the mouse. Below is the script copied
from R and where I get up to before the message occurs. The data set is
based on how
2017 Aug 02
0
switch of cex adjustment with mfrow?
On 02/08/2017 8:29 AM, Jannis via R-help wrote:
> Dear list members,
>
>
> i am trying to create multiple figures with identical layout (i.e. font sizes etc.) for a publication created with Latex. To do so (i.e. to get identical font sizes) I save all plots as a pdf with widths and heights as they would later appear in the paper (to prevent scaling etc.). My problem now is that I
2006 Jan 31
2
Multiple xyplots on the same page
Hi,
I am using the "xyplot" function in the "lattice" package to generate
multiple plots, but I would like to have them plotted on the same page. I
would like to set something equivalent to the command: par(mfrow=c(2,2)),
in order that I can plot 4 xyplots on the same page. How can I do this in
"xyplot"?
I am using R version 2.1.1 on Windows.
Thanks very
2003 Feb 06
2
Fw: Plotting in subareas using par(fig=) parameter
Any idea why I can no longer plot two graphs on the same graphics device
using the par(fig=) parameter?
A simpler par(mfrow=c(1,2)) does work, showing the two plots side-by-side,
but I would like the first
to be larger. This simple example fails:
x<-c(1,1,NA,2,2,NA,3,3)
y<-c(2,4,NA,3,5,NA,1,4)
par(fig=c(0,2/3,0,1))
plot(x,y)
par(fig=c(2/3,1,0,1))
qqnorm(x)
When plotted, the last
2017 Aug 03
1
switch of cex adjustment with mfrow?
> use
>
> par(mfrow=c(2,2), cex = 1)
This does work as written. But when I first checked single-call setting, an mfrow change to cex in the same call superseded cex=1; hence my suggestion to use separate calls to par().
Further checking confirms that the result of a call to par is dependent on argument specification order in the call:
par(mfrow=c(2,2), cex = 1)
par("cex")
#
2013 Jun 25
1
censor=FALSE and id options in survfit.coxph
Terry,
I recently noticed the censor argument of survfit. For some analyses it greatly reduces the size of the resulting object, which is a nice feature.
However, when combined with the id argument, only 1 prediction is made. Predictions can be made individually but I'd prefer to do them all at once if that change can be made.
Chris
#####################################
# CODE
# create
2005 Oct 27
0
where is Jim Lemon? (PR#8259)
This concerns the contributed package "concord". Sorry to bother
you with it, but my attempt to contact the author/maintainer
failed (see below). Perhaps you can forward it, or let me
know where to send it.
Regards, Rob Kushler
------------------------------------------------------
This is the Postfix program at host tak.itd.uts.edu.au.
I'm sorry to have to inform you that
2010 Jan 29
1
How to draw a border for multiple graphs in one page
Hi,
I am struggling to create a 2 by 2 multiple graphs in one page. I used par(mfrow=c(2,2)) to divide the screen into 4. In each screen I draw a pie chart (They are all same).
For example, my data is like this
Concentration value
A1 69
A2 8
G1 51
G2 1
2010 Oct 08
2
Count values in a dataframe with respect to groups
Dear all,
I am looking for a function to count values belonging to a class within a dataframe (and ignore NAs).
grp = c(1,1,1, 1,2, 2,2)
val = c(2,1,5,NA,3,NA,1)
dta = data.frame(grp=grp, val=val)
The result should look like:
grp count
1 3
2 2
At the moment, I am trying to find a function for FUN in aggregate, but with no success. Can anybody help me?
Thanks in advance.
Marcus
2004 Jul 13
3
plotting a table together with graphs
Check out textplot in the gregmisc package ...
Federico Calboli <f.calboli@ucl.ac.uk>
Sent by: r-help-bounces@stat.math.ethz.ch
07/13/2004 12:06 PM
Please respond to f.calboli
To: r-help <r-help@stat.math.ethz.ch>
cc:
Subject: [R] plotting a table together with graphs
Dear All,
I would like to ask how to add a table to a
2009 Aug 20
0
possible problem with plot.lm
Hi,
Here's one toy example that shows what I believe to be a problem with
plot.lm. This was brought up by another user (Marcos Tadeu Andrade
Cordeiro). I took a look at the source and the problem appears to be
related to the fact that you need to reorder the data by the group
means and the correct order of the labels is lost.
set.seed(2)
a <- rnorm(50,0,2)
x <- rep(seq(10, 50,
2001 Sep 18
1
case weights-coxph (solved)
Hi,
The following function does work
optimize.W<-function(W,k,G,Groups,cph.call,z){
n<-length(Groups)
grp.wt<-rep(0,n)
for(i in 1:(length(G))){
ind<-Groups == G[i]
if(G[i]!=k){
grp.wt[ind]<-W[i]
}
elsegrp.wt[ind]<-1
}
z<-data.frame(cbind(z,grp.wt=grp.wt)) #needed to make the case weights
#part of the data
2006 Sep 28
3
complex plots using layout()
Dear r-help,
I am trying to plot several scatter plots with marginal histograms on
one page. Ideally, a page is equally divided into 4 figure regions.
Within each figure region, a scatter plot with marginal histograms will
be plotted.
I followed Dr. Paul Murrell's code released online to successfully plot
the scatter plot with marginal histograms. The code applies "layout()"
to