Displaying 20 results from an estimated 10000 matches similar to: "Options for viewing / using results from lm"
2008 Sep 23
1
Create groups from data to compute lm?
Hello,
Below are the first two rows from my dataset and the header. This dataset
has 5749 rows and I want to select only certain rows to be used based on
existing grouping values. I am trying to group the data based on the values
under 'ex_bin'. (e.g a group for 250, 251, 252, 500, 501, 502) I would then
like to perform a lm for each grouping.
My data:
> all[1:2,]
year extent scape
2008 Oct 09
2
Exporting symnum() result from cor()
Hello,
I am trying to export the results from symnum() while maintain their
readability. I tried using sink to text file and also copying and pasting
but the results end up looking like this:
> symnum(c5.s)
bC bED bEN bLP bLS bPA bPD bPR p
bbContag 1
bbED + 1
bbENN_MN + B 1
bbLPI , , , 1
bbLSI + B B , 1
bbPAFRAC , * * , * 1
bbPD , B B
2011 Jun 01
4
subsetting with condition
Dear R Team,
I am a new R user and I am currently trying to subset my data under a
special condition. I have went through several pages of the subsetting
section here on the forum, but I was not able to find an answer.
My data is as follows:
ID NAME MS Pol. Party
1 John x F
2 Mary s S
2002 Dec 13
2
how to get Residual Standard Error
Hi,
I use lm or loess to make smoothing. After smoothing I need "Residual
Standard Error" in my script. Could you please tell me how can I get
this information?
Thanks,
2018 May 21
1
mapping groups of states without interior borders
I have been using the "map" function in R and I was wondering if there is a way to map multi-state regions just showing the outline of the region without interior state borders. For instance, I am calculating aggregated statistics using 10 multi-state regions. I would like to color-code individual states based on my dataset but then to create black outlines around each of these 10
2008 Oct 01
0
Multiple histograms one graphic device & groupings
Hello,
I am trying to produce some graphics to visualize my data. I think I want
histograms. I have a grouping variable that has 48 different groups. I would
like to produce a graphic that contains three of of these groups in the same
device (they are time steps). I would like create graphics for about 6
different variables (6 variables X 16 groupings of there = 96 graphics). I
am unsure of how
2004 Feb 03
0
Interlazed video posibilities
I don´t found any patent around this but i ned help with the patents.
I can´t found all patents for interlazed video and I only read the
patents around MPEG , the optimization for field based video can be
aplied without problem, this is compatible whih the progresive encoding
and in a few scenarios they can be positive.
<p>process:
<p>common:
-2 bits to indicate video type
0x
2002 Dec 11
1
residuals: lm and glm
Dear list members,
I would like to know the difference in outputs and calculation processes
between residuals.glm(object, type="response") and residuals.lm(object).
For above-ground biomass estimation of trees, I estimated parameters of
an allometric equation (ln y = b0 + b1*ln x) using glm as follows:
fm <- glm(Ws~log(Wb), family=quasi(link="log",
2012 Jul 02
3
residuals from lm
Hi,
I was playing around with something else and I noticed this matrix code for
residuals in a linear model doesn't say what lm() says. Please tell me if I
am completely misguided here.
data(mtcars)
Y <- as.matrix(mtcars[,1])
X <- as.matrix(mtcars[,c(2:11)])
# shouldnt this:
H <- X %*% solve(t(X) %*% X) %*% t(X)
(diag(dim(H)[1]) - H) %*% Y
# be equal to this:
residuals(lm(Y~X))
2009 Feb 19
1
partial residuals & the output of residuals.lm(..., type="partial")
Dear list,
I would like to know how the function residuals.lm calculates the
partial residuals from an lm object with more than one predictor
variable. In other words what is residuals.lm(...,type="partial") doing
behind the scenes? According to the help file for residuals.lm
(?residuals.lm), "The partial residuals are a matrix with each column
formed by omitting a term from
2000 Jan 10
2
lm methods inconsistency?
I'm very new to R so maybe i'm doing something wrong so
please let me know it that is that case.
Here is an example where the summary() and residuals()
applied to lm object produce different results
(I think the residuals() results is correct since SAS produces
those numbers - the second residual corresponding to observation
with weight 4 is wrong in summary()).
x <- c( 10, 20, 30, 40
2008 Jun 30
2
lm and NA
Dear R community, Can I please get some advice on the following: I wish
to obtain a list of residuals, padded by NAs for NAs in my source data. I
tried several options of "na.action", but did not succeed...
Example: I would like to get "0,0,0,0,NA,NA":
> a
[1] 1 2 3 4 NA 9
> b
[1] 3 4 5 6 7 NA
> lm(a~b)$residuals
1 2 3 4
0 0 0 0
>
2010 Jun 21
1
Interpreting lm Residuals...
I am using the lm function in R to fit several linear models to a
fair-sized dataset (~160 collections of ~1000 data points each). My
data have intrinsic, systematic uncertainty much greater than the
measurement errors on any individual point. My thought is to use the
residuals of my linear fits to quantify this intrinsic uncertainty, but
I am puzzled over the correct interpretation of R's
2008 Sep 23
0
How to view or export values of 'names' in a lm
Hello,
I have been using:
model <- lm(y~x+I(x^2))
I am namely interested in the values of the residuals. If I use the 'names'
command I get the following:
names(model)
[1] "coefficients" "residuals" "effects" "rank"
[5] "fitted.values" "assign" "qr" "df.residual"
[9]
2018 Feb 23
2
How to Save the residuals of an LM object greater or less than a certin value to an R object?
Dear list members,
I want to save residuals above or less than a certain value to an R
object. I have performed a multiple linear regression, and now I want
to find out which cases have a residual of above + 2.5 and ? 2.5.
Below I provide the R commands I have used.
Reg<-lm(a~b+c+d+e+f) # perform multiple regression with a as the
dependent variable.
Residuals<-residuals(reg) # store
2006 Jul 03
1
how to get the studentized residuals in lm()
Dear friends,
In s-plus, lm() generates the the studentized residuals
automatically for us, and In R, it seems don't have the results: After
i fitted lm(), i use attibutes() to see the objects and didn't find
studentized residuals .
How to get the the studentized residuals in lm(),have i missed something?
thanks very much!
--
Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
2005 Jun 28
1
Possible bug in summary of residuals with lm and weights
I sent this to r-devel the other day but didn't get any takers. This
may not be a bug but rather an inconsistency.
I'm not sure if this is intentional. summary.lm stores weighted
residuals whereas I think most users will want print.summary.lm to
summarize unweighted ones as if saying summary(resid(fit)).
> set.seed(1)
> dat <- data.frame(y = rnorm(15), x = rnorm(15), w = 1:15)
2018 Feb 23
0
How to Save the residuals of an LM object greater or less than a certin value to an R object?
Residuals are stored as a numeric vector. The R software comes with a document "Introduction to R" that discusses basic math functions and logical operators that can create logical vectors:
abs( stdresiduals ) > 2.5
It also discusses indexing using logical vectors:
stdresiduals[ abs( stdresiduals ) > 2.5 ]
Note that in most cases it is worth going the extra step of making your
2000 Dec 19
1
Bug in glm.fit() or plot.lm() (PR#778)
Here's a bug one of my students noticed.
When you call plot() on a glm object, plot.lm gets called. The second
plot it shows is supposed to give a normal QQ plot of the standard
deviance residuals, but it doesn't. The glm object created by glm.fit
returns something (the IRLS weights?) in fit$weights which plot.lm
takes as observation weights, so you get strange residuals in the QQ
2002 Aug 09
1
LM: Least Squares on Large Datasets OR why lm() is designed the w ay it is
Hi,
I have always been wondering why S-Plus/R can not fit a linear model to an
arbitrary large data set given that, I thought, it should be pretty
straightforward. Sometime ago I came across a reference to LM package,
http://www.econ.uiuc.edu/~anovo/LM.html, by Roger Koenker and Alvaro Novo.
So I thought here it is at last, but to my surprise this project hasn't made
to the recommended