Displaying 20 results from an estimated 6000 matches similar to: "bugs in summary.lm (PR#7061)"
2003 Apr 14
1
suggested changes to summary.glm and summary.lm (PR#2776)
Something for the wish list (not really a bug):
I was reminded of what I see as a problem with summary.glm last week when
some of my students fell into a trap in a homework exercise, defining a
logit model in which coefficients were aliased. When this happens in lm,
summary.lm prints a message ["Coefficients: (1 not defined because of
singularities)"], but summary.glm is silent. In
2010 Jul 02
2
how to save summary(lm) and anova (lm) in format?
Hi, folks,
I would like to copy the output of summary(lm) and anova (lm) in R to my
word file. But the output will be a mess if I just copy after I call summary
and anova.
#####################
x=rnorm(10)
y=rnorm(10,mean=3)
lm=lm(y~x)
summary(lm)
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-1.278567 -0.312017 0.001938 0.297578 1.310113
2003 Dec 06
2
Difference between summary.lm() and summary.aov()
I have a simple linear model (fitted with lm()) with 2
independant
variables : one categorical and one integer.
When I run summary.lm() on this model, I get a
standard linear
regression summary (in which one categorical variable
has to be
converted into many indicator variables) which looks
like :
Estimate Std. Error t value Pr(>|t|)
(Intercept) -3595.3 2767.1 -1.299
2008 Mar 04
0
R2HTML - align a table from summary.lm
Hi all,
I use the R2HTML package to print results, but I have a little problem when
I want to print a table provides from a summary.lm.
If I want to align this table differently of the others, I use the "align"
argument ("left", "center or "right") of the HTML function , but it prints
"Coefficients left" (or "Coefficients center",
2006 Dec 24
1
extend summary.lm for hccm?
dear R experts:
I wonder whether it is possible to extend the summary method for the
lm function, so that it uses an option "hccm" (well, model "hc0"). In
my line of work, it is pretty much required in reporting of almost all
linear regressions these days, which means that it would be very nice
not to have to manually library car, then sqrt the diagonal, and
recompute
2016 Apr 08
0
R.squared in summary.lm with weights
On 07/04/2016 5:21 PM, Murray Efford wrote:
> Following some old advice on this list, I have been reading the code for summary.lm to understand the computation of R-squared from a weighted regression. Usually weights in lm are applied to squared residuals, but I see that the weighted mean of the observations is calculated as if the weights are on the original scale:
>
> [...]
> f
2006 Aug 30
0
Summary() fails after use of na.action="na.exclude" in lm() (PR#9191)
Hello!
I have already reported on this behaviour at [1] and now I have checked
the same example on r-devel and the problem is still there. Thomas
Lumley inidicated problem [2]. Example:
n <- 50
x <- runif(n=n)
y1 <- 2 * x + rnorm(n=n)
y2 <- 5 * x + rnorm(n=n)
y2[sample(1:n, size=5)] <- NA
y <- cbind(y1, y2)
## Goes ok here
fit <- lm(y1 ~ 1,
2007 Nov 30
1
Trivial formatting typo in summary(lm()) (PR#10480)
Full_Name: Jeffrey Racine
Version: 2.6.1 and previous...
OS: FreeBSD
Submission from: (NULL) (130.113.139.86)
Hi.
I almost feel bad reporting this, but here goes.
The summary() for lm() (and possibly others?) uses a capitalized `S' in Multiple
R-Squared but a lowercase `s' in Adjusted R-squared. For instance,
Residual standard error: 0.5608 on 202 degrees of freedom
Multiple
2004 Dec 02
1
treatment contrasts and summary.lm
Dear list members,
I have a 2-factor ANOVA where the summary.lm output looks like this
(using treatment contrasts):
Value Std. Error t value Pr(>|t|)
(Intercept) 0.0389 0.0220 1.7695 0.0817
as.factor(Block)1 0.0156 0.0066 2.3597 0.0215
as.factor(Block)2 -0.0018 0.0037 -0.4857 0.6289
as.factor(Block)3 -0.0007 0.0026 -0.2812 0.7795
2005 Feb 17
2
dumping the summary of lm to a text file
Hello list,
I have a linear regression
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
reg <- lm(weight ~ group)
sreg <- summary(reg)
and I would like to dump exactly what I see on the console with
2005 Apr 18
1
R-squared in summary(lm...)
What is the difference between the two R-squareds returned for a linear
regression by summary(lm...)? When might one report multiple vs. adjusted
R-squared?
Thank you,
Ben Osborne
--
Botany Department
University of Vermont
109 Carrigan Drive
Burlington, VT 05405
benjamin.osborne at uvm.edu
phone: 802-656-0297
fax: 802-656-0440
2005 Jun 14
1
Puzzled in utilising summary.lm() to obtain Var(x)
I have a program which is doing a few thousand runs of lm(). Suppose
it is a simple model
y = a + bx1 + cx2 + e
I have the R object "d" where
d <- summary(lm(y ~ x1 + x2))
I would like to obtain Var(x2) out of "d". How might I do it?
I can, of course, always do sd(x2). But it would be much more
convenient if I could snoop around the contents of summary.lm and
2006 Feb 26
1
changing degrees of freedom in summary.lm()
Hello all,
I'm trying to do a nested linear model with a dataset that incorporates
an observation for each of several classes within each of several plots.
I have 219 plots, and 17 classes within each plot.
data.frame has columns "plot","class","age","dep.var"
With lm(dep.var~class*age),
The summary(lm) function returns t-test and F-test values
2006 Apr 24
1
omitting coefficients in summary.lm()
Hi,
I'm running a regression using lm(), in which one of the right-hand side
variables is factor with many levels (say, 80). I am not intersted in the
estimates of the resulting dummies, but I have to include them in my
regression equation. So, I don't want the estimates associated with theses
dummies to be printed by summary.lm( ). Is there an easy way to do this?
Thank you,
Dimitri
2006 May 16
1
lm summary
Dear all,
Is there anybody who can help me to avoid scientific number in the summary of an lm model?
Here there is an example of a usual output of the lm model.
Thank you!
Guillermo
Example
summary(lm(promiscuity.Index~allK))
Call:
lm(formula = promiscuity.Index ~ allK)
Residuals:
Min 1Q Median 3Q Max
-1.67094 -0.13126 0.06703 0.19913 0.40673
Coefficients:
2010 Aug 05
0
interpretation of summary.lm() for ANOVA and ANCOVA when dealing with 2 or more factors
Hi,
I am having a hard time getting what the summary.lm-output for an ANOVA / ANCOVA means.
Examples I find always seem to deal with simpler cases than what I meet in my data.
My main problem is understanding the output when getting significant INTERACTION TERMS (what never occurs in examples :().
The following is the output after summary.lm(ancova) where "week" is continuous,
2010 Oct 30
1
summary.lm as a post-hoc test?
Let's assume that according to Anova(lm(y~a*b, data=d)) the a:b interaction is significant, and I would like to know if there are specific combinations of a and b levels that differ from the control group. Are there any caveats against simply looking at the p-values in the output generated by summary(lm(y~a*b,data=d))? The documentation for summary.lm says nothing about multiple comparison
2010 Oct 30
1
summary.lm for post-hoc tests
Let's say I've run Anova(lm(y~a*b)) and found the a:b interaction to be
significant. Now I'm interested in which specific level combinations of
a and b significantly differ from the control group. Can I use the
t-tests from summary(lm(y~a*b)) to answer that question?
I saw no mention of multiple comparison in the documentation for
summary.lm, so am I right in assuming I need to
2023 Feb 18
0
summary.lm fails for difftime objects
lm works with difftime objects but then if you try to get the summary
it fails with an error:
fit <- lm(as.difftime(Time, units = "mins") ~ demand, BOD)
summary(fit)
## Error in Ops.difftime((f - mean(f)), 2) :
## '^' not defined for "difftime" objects
A number of other lm methods also fail, e.g. plot(fit), but others
work, e.g. coef(fit), resid(fit)
--
2011 Dec 04
1
LaTeX output for summary.lm object - while displaying the information outside the table
This seemed to me to be basic, but I can't seem to find a solution online,
so I wondered what I might be missing.
I wish to include the output of an lm summary object inside an Sweave
(.Rnw) document. I can either output the summary.lm as is, or use the
xtable/Hmisc packages (through xtable or latex commands).
Is there something like xtable that also gives the summary information
which is