The final goal is to make two lines and find the intersection point.
I don't want to argue more about the reason.
The tol suggestion is reasonable, and I'll take that.
2019/4/19 4:12, Jeff Newmiller:
The fact that you think x~y is interchangeable with y~x suggests to me that you
will have a
gt; Wang
> Sent: Thursday, April 18, 2019 12:36 PM
> To: Michael Dewey ; r-help@r-project.org
> Subject: Re: [R] lm fails on some large input
>
> I just want to make a line out of timestamps vs some coordinates, so y~x or
> x~y doesn't matter.
>
> Yes, I know the answer. Wh
The fact that you think x~y is interchangeable with y~x suggests to me that you
will have a difficult time convincing R Core that this is a bug. I recommend
that you take at leastan upper division college course in linear regression
first.
On April 18, 2019 9:35:55 AM PDT, Dingyuan Wang
I just want to make a line out of timestamps vs some coordinates, so y~x
or x~y doesn't matter.
Yes, I know the answer. When trying R, I'm surprised that R can't solve
that either. I first noticed that PostgreSQL can't solve it, and found
that they fixed that in pg 12.
I make a general rule not to stick time values into numerical analysis
algorithms without first subtracting a reasonable epoch (to obtain difftime)
and then using as.numeric.POSIXt with the units argument set explicitly so the
analysis uses numeric values that I can interpret. While the
Dear Peter,
> -Original Message-
> From: peter dalgaard [mailto:pda...@gmail.com]
> Sent: Thursday, April 18, 2019 12:23 PM
> To: Fox, John
> Cc: Michael Dewey ; Dingyuan Wang
> ; r-help@r-project.org
> Subject: Re: [R] lm fails on some large input
>
> Um,
> On Apr 18, 2019, at 8:24 AM, Michael Dewey wrote:
>
> Perhaps subtract 1506705766 from y?
Good advice. Some further notes follow.
One can specify `tol` to have a smaller than default value
e.g.
m2 <- lm(x ~ y, tol=1e-12)
which is accurate:
plot(y,x)
abline(coef=coef(m2))
Users
This sort of data arises quite easily if you deal with time/dates around
now. E.g.,
> d <- data.frame(
+ when = seq(as.POSIXct("2017-09-29 18:22:01"), by="secs", len=10),
+ measurement = log2(1:10))
> coef(lm(data=d, measurement ~ when))
(Intercept) when
d Dingyuan Wang,
>
>> -Original Message-
>> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael
>> Dewey
>> Sent: Thursday, April 18, 2019 11:25 AM
>> To: Dingyuan Wang ; r-help@r-project.org
>> Subject: Re: [R] lm fails on some large inp
Dear Michael and Dingyuan Wang,
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael
> Dewey
> Sent: Thursday, April 18, 2019 11:25 AM
> To: Dingyuan Wang ; r-help@r-project.org
> Subject: Re: [R] lm fails on some large input
>
Perhaps subtract 1506705766 from y?
Saying some other software does it well implies you know what the
_correct_ answer is here but I would question what that means with this
sort of data-set.
On 17/04/2019 07:26, Dingyuan Wang wrote:
Hi,
This input doesn't have any interesting properties
Hi,
This input doesn't have any interesting properties except y is unix
time. Spreadsheets can do this well.
Is this a bug that lm can't do x ~ y?
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
> On 13 Nov 2018, at 16:19 , Paul Johnson wrote:
>
> Long ago, when R's t.test had var.equal=TRUE by default, I wrote some
> class notes showing that the result was equivalent to a one predictor
> regression model. Because t.test does not default to var.equal=TRUE
> these days, I'm curious
Long ago, when R's t.test had var.equal=TRUE by default, I wrote some
class notes showing that the result was equivalent to a one predictor
regression model. Because t.test does not default to var.equal=TRUE
these days, I'm curious to know if there is a way to specify weights
in an lm to obtain
You need statistical help, which is generally off topic here. I
suggest you post to a statistcal site like stats.stackexchange.com
instead. Better yet, find a local statistical expert with whom you can
consult.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep
> On 20 Sep 2016, at 11:34, Michael Haenlein wrote:
>
> Dear all,
>
> I am trying to estimate a lm model with one continuous dependent variable
> and 11 independent variables that are all categorical, some of which have
> many categories (several dozens in some cases).
Dear all,
I am trying to estimate a lm model with one continuous dependent variable
and 11 independent variables that are all categorical, some of which have
many categories (several dozens in some cases).
I am not interested in statistical inference to a larger population. The
objective of my
> peter dalgaard
> on Tue, 26 Jul 2016 23:30:31 +0200 writes:
>> On 26 Jul 2016, at 22:26 , Hadley Wickham
>> wrote:
>>
>> On Tue, Jul 26, 2016 at 3:24 AM, Martin Maechler
>> wrote:
>>>
Agh. I've argued elsewhere that the default behaviour should be to
fail, and the user should take the responsibility to explicitly handle
the missing values, even if that simply be by changing the argument.
Probably Peter and I have different experiences with the completeness
of datasets, but
> On 26 Jul 2016, at 22:26 , Hadley Wickham wrote:
>
> On Tue, Jul 26, 2016 at 3:24 AM, Martin Maechler
> wrote:
>>
...
> To me, this would be the most sensible default behaviour, but I
> realise it's too late to change without breaking many
> I think that's a bit too strict for me, so I wrote my own:
>
> na.warn <- function(object, ...) {
> missing <- complete.cases(object)
> if (any(missing)) {
> warning("Dropping ", sum(missing), " rows with missing values",
> call. = FALSE)
> }
>
> na.exclude(object, ...)
> }
That
On Tue, Jul 26, 2016 at 3:24 AM, Martin Maechler
wrote:
> I have been asked (in private)
Martin was very polite to not share my name, but it was me :)
> > Hi Martin,
>
> y <- c(1, 2, 3, NA, 4)
> x <- c(1, 2, 2, 1, 1)
>
> t.test(y ~ x)
> lm(y ~ x)
I have been asked (in private)
> Hi Martin,
y <- c(1, 2, 3, NA, 4)
x <- c(1, 2, 2, 1, 1)
t.test(y ~ x)
lm(y ~ x)
> Normally, most R functions follow the principle that
> "missings should never silently go missing". Do you have
> any background on why these
I think you would just need to replace the lm() function call with
cor(x,y,method="spearman". It would probably be more informative to
actually plot by the magnitude of the correlation coefficient (all |r| >=
0.20 or something similar) rather than just by those with P <=0.05.
Brian
Brian S.
Please read ?lm! -- where it says:
method:
the method to be used; for fitting, currently only method = "qr" is
supported; method = "model.frame" returns the model frame (the same as
with model = TRUE, see below).
More to the point, your request for a "spearman" method for lm() makes
little or
Hi,
A following function was kindly provided by GGally’s maintainer, Barret
Schloerke.
function(data, mapping, ...) {
p <- ggplot(data = data, mapping = mapping) +
geom_point(color = I("blue")) +
geom_smooth(method = "lm", color = I("black"), ...) +
theme_blank() +
I have model-data named as: model that is split as model.T(train) and
model.V(test or validation). The least square model (from lm to step) is built
withmodel.T and I like to see how model.T is robust by comparing predicted
model.V toactual model.V. How do I get score for model.V based on
Your first predict sets up a newdata with a column name that is not the same as
the one that you used in the lm formula. The failure to match causes R to look
in the global environment, where it finds AT.
You really should make a habit of always putting your regression data into a
data.frame
Hello,I used l to draw a figure, but I got different result (26 vs 301) when I
input the same parameters.
> length(predict(lm(A$Counts ~ AT),list(ATE=timevalues)))
[1] 26
> length(predict(lm(A$Counts ~ ATE),list(ATE=timevalues)))
[1] 301
all variables are initialized as below:
>A <-
.
Cheers
Petr
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Livia
Maria Vestergaard
Sent: Wednesday, May 06, 2015 11:37 AM
To: r-help
Subject: [R] lm model exported from R to excel
Hi all
I all. I am wondering whether anybody know how to export
Hi Livia,
One way is to use the delim.table function in the prettyR package.
See the examples, in particular the final one. The resulting TAB
delimited file will usually import directly into Excel.
Jim
On Wed, May 6, 2015 at 7:36 PM, Livia Maria Vestergaard
lves...@student.sdu.dk wrote:
Hi all
-Original Message-
From: Livia Maria Vestergaard [mailto:lves...@student.sdu.dk]
Sent: Wednesday, 6 May 2015 22:37
To: Duncan Mackay; R
Subject: SV: [R] lm model exported from R to excel
Hi Duncan
Thank you so much - it worked :)
Best
Livia
Fra
Hi all
I all. I am wondering whether anybody know how to export an output of an lm
model from R to excel in order to have excel recognize the table that comes and
divide the numbers in the table into columns and rows?
I really hope it is possible? :)
Best Livia
and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Livia Maria
Vestergaard
Sent: Wednesday, 6 May 2015 19:37
To: r-help
Subject: [R] lm model exported from R
; R
Subject: Re: [R] lm model exported from R to excel
Hi Duncan
Thank you so much - it worked :)
Best
Livia
Fra: Duncan Mackay [dulca...@bigpond.com]
Sendt: 6. maj 2015 14:26
Til: R; Livia Maria Vestergaard
Emne: RE: [R] lm model exported from R to excel
Hi Duncan
Thank you so much - it worked :)
Best
Livia
Fra: Duncan Mackay [dulca...@bigpond.com]
Sendt: 6. maj 2015 14:26
Til: R; Livia Maria Vestergaard
Emne: RE: [R] lm model exported from R to excel
Hi Livia
There are several html packages
it
Duncan
-Original Message-
From: John Kane [mailto:jrkrid...@inbox.com]
Sent: Thursday, 7 May 2015 01:34
To: Duncan Mackay; R
Subject: Re: [R] lm model exported from R to excel
And for those of us who know close to nothing about HTML I found just now
that under a basic print.xtable commmand
to LaTeX where the output looks beautiful. I like booktabs :)
John Kane
Kingston ON Canada
-Original Message-
From: dulca...@bigpond.com
Sent: Thu, 7 May 2015 00:32:48 +1000
To: r-help@r-project.org
Subject: Re: [R] lm model exported from R to excel
If you know some basic html
a regression about
to improve the model?
Cheers
Livia :)
Fra: Boris Steipe [boris.ste...@utoronto.ca]
Sendt: 29. april 2015 20:25
Til: Livia Maria Vestergaard
Cc: r-help mailing list
Emne: Re: [R] LM() and time in R
Have a look at the help page
Vestergaard
Cc: r-help mailing list
Emne: Re: [R] LM() and time in R
Have a look at the help page for the function ts()
(type ?ts at the R prompt). Other than that, you haven't provided nearly
enough information for us to diagnose your issue.
Please see here for some hints on how to ask
Have a look at the help page for the function ts()
(type ?ts at the R prompt). Other than that, you haven't provided nearly
enough information for us to diagnose your issue.
Please see here for some hints on how to ask questions productively:
http://adv-r.had.co.nz/Reproducibility.html
Hello,
I need some help with a project that I’m working one.
Im trying to make a l regression model (lm) in r with time as independant
variable and gas prices as the depended.
But It seems like everything im trying to run it, R freeze, I think that I need
to tell R somehow that my time is
Hi Livia,
From your description, it sounds like the time variable is actually
a vector of date strings like 30/04/2015. These will usually be
input as factors in R, meaning that you probably had a very large
number of categorical values instead of numeric. To find out, do this:
try lm.ridge from MASS package.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented,
Hi,
Currently i am working with the lm() function for some regressions required
for my project.
suppose the formula parameter in that is given by response ~ terms,after
some testing i found out that when the number of observations under terms
is less than the number of columns or features
You really really really need to work with a local statistical expert, as
your post indicates fundamental confusion. Furthermore, statistical issues
are off topic here.
Cheers,
Bert
On Friday, April 24, 2015, Praveen kr singh pcubesi...@gmail.com wrote:
Hi,
Currently i am working with the
Hi all,
I need to loop over lm within a function using weights. For example:
mydata = data.frame(y=rnorm(100, 500, 100), x= rnorm(100),
group=rep(c(0,1), 50), myweight=1/runif(100))
reg.by.wt - function(formula, wt, by, data) {
if(missing(by)) {
summary(lm(formula=formula, data=data,
One way to accomplish this is to assign a new environment to the
formula, an environment which inherits from the formula's original
environment but one that you can add things to without affecting the
original environment. Also, since you do this in a function only the
copy of the formula in the
Hi,
I'm quite new to R and currently trying to use lm to fit linear models but I am
currently stuck my code is as follows:
Model1 = function(meth_matrix,exposure, X1, X2, X3, batch) {
mod = lm(meth_matrix[, methcol]~exposure+X1+X2+X3+batch)
res = summary(mod)$coef[2,]
Dear all,
I am working through a problem at the moment and have got stuck. I have
searched around on the help list for assistance but could not find anything -
but apologies if I have missed something. A dummy example of my problem is
below. I will continue to work on it, but any help would be
Well...
If my arithmetic and understanding is correct, that's 32 billion
combinations, which, to put it politely, is nuts. As all you'll be
doing is generating random numbers anyway, the fastest way to do this
is just to use a random number generator.
Cheers,
Bert
Bert Gunter
Genentech
Hi.
I'm trying to produce lm fitted values and standard errors for cases with
missing y values. I know how to compute these myself with matrix algebra, but
I'm wondering if there is an appropriate na.action in the lm function to do
this.
Here is some simple code where I use na.action=NULL with
Yes. I believe what you're looking for is:
See ?predict.lm and what it has to say about the na.action=na.exclude
argument to lm.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
Data is not information. Information is not knowledge. And knowledge
is certainly not
Hello,
I believe you want na.action = na.exclude.
lmnew - lm(newy ~ newx,newdata,na.action=na.exclude)
na.action can not be set to TRUE or FALSE. From the help page ?lm
na.action
a function which indicates what should happen when the data contain NAs.
The default is set by the
Hi, all
I am trying to figure out the computation result for
predict.lm(...,type=terms) when the original fitting model has a
nesting term, lm(y ~ group/x ).
A example,
set.seed(731)
group - factor(rep(1:2, 200))
x - rnorm(400)
fun1 - function(x) -3*x+8
fun2 - function(x) 15*x-18
y -
Hi, all
I am trying to figure out the computation result for
predict.lm(...,type=terms) when the original fitting model has a
nesting term, lm(y ~ group/x ).
A example,
set.seed(731)
group - factor(rep(1:2, 200))
x - rnorm(400)
fun1 - function(x) -3*x+8
fun2 - function(x) 15*x-18
y -
Hi, all
I am trying to figure out the computation result for
predict.lm(...,type=terms) when the original fitting model has a
nesting term, lm(y ~ group/x ).
A example,
set.seed(731)
group - factor(rep(1:2, 200))
x - rnorm(400)
fun1 - function(x) -3*x+8
fun2 - function(x) 15*x-18
y -
Please see the posting guide: posting 3 times only reduces your chance
of an informative answer (as does posting in HTML). Your posting is too
vague for others to know what it is you do not understand.
R is Open Source: please read the sources for the definitive answer to
the 'know the
Hello,
I am a rather unexperienced r-user (learned the language 1 month ago) and
run into the following problem using a local computer with 6 cores 24 GB
RAM and R 2.15 64-bit. I didn't install any additional packages
1. Via the read.table command I load a data table (with different data
types)
Dear Alex,
Here you have some url's:
http://data.princeton.edu/R/linearModels.html
http://www.r-bloggers.com/r-tutorial-series-simple-linear-regression/
Regards,
Eva
--- El mié, 6/3/13, Alaios ala...@yahoo.com escribió:
De: Alaios ala...@yahoo.com
Asunto: [R] lm and Formula tutorial
Para: R
On Wed, Mar 6, 2013 at 9:51 AM, Jonas125 schleeberge...@pg.com wrote:
Hello,
I am a rather unexperienced r-user (learned the language 1 month ago) and
run into the following problem using a local computer with 6 cores 24 GB
RAM and R 2.15 64-bit. I didn't install any additional packages
1.
I may be wrong, but I believe what makes it difficult is that the Help
file assumes some linear model statistics that you may not have. I
suggest that you look for a tutorial on linear models first and then
re-read the Help. Incidentally, the provenance of the syntax is GLIM
(correction requested
The datatable (and the split obviously) only contain characters and numeric
data.
I found that 4 regression in a row work if I don't use the calculated
columns as variables but 2 of the original columns.
RAM usage stays below 3GB!
-- Why does R has such problems with the calculated columns?
Le mercredi 06 mars 2013 à 08:31 -0800, Jonas125 a écrit :
The datatable (and the split obviously) only contain characters and numeric
data.
I found that 4 regression in a row work if I don't use the calculated
columns as variables but 2 of the original columns.
RAM usage stays below 3GB!
Length(Datasplit) = 7100
I did a regression for Datasplit[[1]] and the calculated columns -- the
object size is 70 MB. Quite large
Assuming that R cannot handle inf values in regressions (didn't have the
time to google it)
How can I avoid the calculation of infinite values? Like If the
Le mercredi 06 mars 2013 à 09:18 -0800, Jonas125 a écrit :
Length(Datasplit) = 7100
I did a regression for Datasplit[[1]] and the calculated columns -- the
object size is 70 MB. Quite large
7100*70/1024 = 485 (GB)
No wonder why you run out of memory quite fast.
You probably do not need
Dear all,
I was reading last night the lm and the Formula manual page, and 'I have to
admit that I had tough time to understand their syntax. Is there a simpler
guide for the dummies like me to start with?
I would like to thank you in advance for your help
Regards
Alex
[[alternative
Smells like homework to me. If so, we don't do homework on this list.
-- Bert
On Thu, Feb 14, 2013 at 3:55 PM, email email8...@gmail.com wrote:
Hello:
I have a 4-column dataset: Crime, Education, Urbanization, Age. I want to
construct a multiple linear regression to find the effect of
Hello:
I have a 4-column dataset: Crime, Education, Urbanization, Age. I want to
construct a multiple linear regression to find the effect of Education,
Urbanization, and Age on Crime
lm(Crime ~ Education + Urbanization + Age)
If I use + in above statement, does it mean it will build a model to
Hi,
Did you read the help file? Particularly the section Details.
?lm
Regards,
Pascal
Le 15/02/2013 08:55, email a écrit :
Hello:
I have a 4-column dataset: Crime, Education, Urbanization, Age. I want to
construct a multiple linear regression to find the effect of Education,
Urbanization,
You will also need to specify/ name your model:
Mod - lm(Crime~.
~Nicole Ford
Graduate Instructor
Department of Government and International Affairs
University of South Florida
office: SOC 012M
e: nmhi...@mail.usf.edu
http://gia.usf.edu/student/nford/
Sent from my iPhone
On Feb 14,
You could also run it and find out.
There are many R tutorials free online.
I presume crime is continuous, as well...?
~Nicole Ford
Graduate Instructor
Department of Government and International Affairs
University of South Florida
office: SOC 012M
e: nmhi...@mail.usf.edu
I am following a document teaching how to use regression and right at the
onset I get an R error. I understand that variables conc and signal
should have the same length but I am using the what R manual suggests to
drop the error and it is not cooperating. What gives? The manual says
that the
On Fri, Nov 9, 2012 at 4:37 PM, tesssa tesara...@gmail.com wrote:
I am following a document teaching how to use regression and right at the
onset I get an R error. I understand that variables conc and signal
should have the same length but I am using the what R manual suggests to
drop the
-Original Message-
From: tesara...@gmail.com
Sent: Fri, 9 Nov 2012 08:37:13 -0800 (PST)
To: r-help@r-project.org
Subject: [R] lm function - strange error
I am following a document teaching how to use regression and right at the
onset I get an R error. I understand that variables conc
Sorry it is not a comma but a tilda. The R.help message editor Please
replace the dash with a tilda as lm function requires
--
View this message in context:
http://r.789695.n4.nabble.com/lm-function-strange-error-tp4649065p4649074.html
Sent from the R help mailing list archive at
How do you lm throw away excess data points. I am following the
documentation with no success
--
View this message in context:
http://r.789695.n4.nabble.com/lm-function-na-action-tp4649075.html
Sent from the R help mailing list archive at Nabble.com.
Here is the document
http://www.montefiore.ulg.ac.be/~kvansteen/GBIO0009-1/ac20092010/Class8/Using%20R%20for%20linear%20regression.pdf
--
View this message in context:
http://r.789695.n4.nabble.com/lm-function-strange-error-tp4649065p4649080.html
Sent from the R help mailing list archive at
On Nov 9, 2012, at 9:16 AM, tesssa wrote:
Sorry it is not a comma but a tilda. The R.help message editor Please
replace the dash with a tilda as lm function requires
It might be interesting to have such a supernatural entity zooming around the
Rhelp Universe answering prayers from
hope this helps.
John Kane
Kingston ON Canada
-Original Message-
From: tesara...@gmail.com
Sent: Fri, 9 Nov 2012 09:36:23 -0800 (PST)
To: r-help@r-project.org
Subject: Re: [R] lm function - strange error
Here is the document
http://www.montefiore.ulg.ac.be/~kvansteen/GBIO0009-1
-Original Message-
From: dwinsem...@comcast.net
Sent: Fri, 9 Nov 2012 10:56:48 -0800
To: tesara...@gmail.com
Subject: Re: [R] lm function - strange error
On Nov 9, 2012, at 9:16 AM, tesssa wrote:
Sorry it is not a comma but a tilda. The R.help message editor Please
On Fri, Nov 9, 2012 at 2:20 PM, John Kane jrkrid...@inbox.com wrote:
-Original Message-
From: dwinsem...@comcast.net
Sent: Fri, 9 Nov 2012 10:56:48 -0800
To: tesara...@gmail.com
Subject: Re: [R] lm function - strange error
On Nov 9, 2012, at 9:16 AM, tesssa wrote:
Sorry
)
I hope this helps.
John Kane
Kingston ON Canada
-Original Message-
From: tesara...@gmail.com
Sent: Fri, 9 Nov 2012 09:36:23 -0800 (PST)
To: r-help@r-project.org
Subject: Re: [R] lm function - strange error
Here is the document
http://www.montefiore.ulg.ac.be
-Original Message-
From: sarah.gos...@gmail.com
Sent: Fri, 9 Nov 2012 14:34:57 -0500
To: jrkrid...@inbox.com
Subject: Re: [R] lm function - strange error
On Fri, Nov 9, 2012 at 2:20 PM, John Kane jrkrid...@inbox.com wrote:
-Original Message-
From: dwinsem
Subject: Re: [R] lm function - strange error
Hi Tessa, I agree with John. I think you've made a typo, but looking at your
data I think the zero concentration should not be there. Try plotting it.
conc = c(10, 20, 30, 40, 50)
signal = c (4, 22, 44, 60, 82)
plot(signal~conc)
abline
On Fri, Nov 9, 2012 at 5:21 PM, tesssa tesara...@gmail.com wrote:
How do you lm throw away excess data points. I am following the
documentation with no success
Why would you want to throw away this data? I think that's generally
considered sub-optimal model-fitting technique, thought it might
Dear list,
I am making a linear regression of the following format.
lm(Y~X1+X2+log(X3)+log(X4))
Now I would like to check the linear regression above using generalized
linear model.
Please kindly if the following format is correct and thank you.
(If it is wrong, please indicate why.)
Baoqiang,
Here's an approach that should work:
(1) Make sure that the column names of trainx and testx are the same.
(2) Combine trainy and trainx into a data frame for fitting the model.
(2) Use the newdata= argument in the predict() function.
(3) Convert testx from matrix to data frame.
# some
Hi,
I have a question about using lm on matrix, have to admit it is very
trivial but I just couldn't find the answer after searched the mailing
list and other online tutorial. It would be great if you could help.
I have a matrix trainx of 492(rows) by 220(columns) that is my x,
and trainy is 492
On Wed, Oct 10, 2012 at 3:35 PM, Baoqiang Cao bqcaom...@gmail.com wrote:
Hi,
I have a question about using lm on matrix, have to admit it is very
trivial but I just couldn't find the answer after searched the mailing
list and other online tutorial. It would be great if you could help.
I
The cor(mtcars$mpg, fitted(m0))^2 method works great - thanks so much Josh!
I've had another instance (also ex intercept) where it actually gave the
correct number, odd behavior.
Thanks for the other posts also. As an aside, in my application a zero
intercept makes economic sense and I'm using
Hi,
Sounds like suppression -- see e.g.,
http://www.jstor.org/stable/2988294?seq=1 for a discussion.
Since this is not an R question but a statistical one, it may be more
appropriate to post this question to a statistics forum such as
http://stats.stackexchange.com/
Best,
Ista
On Tue, Aug 7,
Hi, (R version 2.15.0)
I am running a pgm with 1 response (earlier standardized Y) and 44
independent vars (Xi) from the same data =a2:
When I run the 'lm' function on single Xi at a time, the beta
coefficient for let's say X1 is = -0.08 (se=0.03256)
But when I run the same Y with 44 Xi-s with
On Feb 18, 2011, at 14:20 , Jan wrote:
Hello Achim,
Not quite. Consult your statistics textbook for the correct interpretation
of p-values. Under the null hypothesis of a true intercept of zero, it is
very likely to observe an intercept as large as 13.52 or larger.
thank you for that
On Feb 18, 2011, at 14:20 , Jan wrote:
One of the references you googled suggests that intercepts should never
be omitted. Is this true even if I know that the physical reality behind
the numbers suggests an intercept of zero?
No. That'll be a piece of pragmatic advice caused by the
I've just picked up R (been using Matlab, Eviews etc) and I'm having the same
issue. Running reg=lm(ticker1~ticker2) gives R^2=50% while running
reg=lm(ticker1~0+ticker2) gives R^2=99%!! The charts suggest the fit is
worse not better and indeed Eviews/Excel/Matlab all say R^2=15% with
Hi,
R actually uses a different formula for calculating the R square
depending on whether the intercept is in the model or not.
You may also find this discussion helpful:
http://stats.stackexchange.com/questions/7948/when-is-it-ok-to-remove-the-intercept-in-lm/
If you conceptualize R^2 as the
Hi
is there a command that calculates the correct adjusted R-squared, when
I work without intercept? (The R-squared from lm without intercept is
false.)
Greetings
Chrsitof
__
R-help@r-project.org mailing list
On 27.06.2012 09:33, Christof Kluß wrote:
Hi
is there a command that calculates the correct adjusted R-squared, when
I work without intercept? (The R-squared from lm without intercept is
false.)
Then we need your definition of your version of correct - we know the
definition of your
On 06/27/2012 10:33 AM, Christof Kluß wrote:
Hi
is there a command that calculates the correct adjusted R-squared, when
I work without intercept? (The R-squared from lm without intercept is
false.)
Hi! This answer in R-FAQ might help you:
1 - 100 of 342 matches
Mail list logo