[R] Correct statistical inference for linear regression models without intercept in R
Dear R community, is there a way to get correct t- and p-values and R squared for linear regression models specified without an intercept? example model: summary(lm(y ~ 0 + x)) This gives too low p-values and too high R squared. Is there a way to correct it? Or should I specify with intercept to get the correct values? Thank you in advance! Wojtek Musial -- View this message in context: http://r.789695.n4.nabble.com/Correct-statistical-inference-for-linear-regression-models-without-intercept-in-R-tp2295193p2295193.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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, minimal, self-contained, reproducible code.
Re: [R] Correct statistical inference for linear regression models without intercept in R
Let's assume x and y as stationary. It's not a spurious regression problem here. I think the function lm() has to have an intercept to give correct values of t- and p- and R squared. I wonder if you can correct the values in R though? -- View this message in context: http://r.789695.n4.nabble.com/Correct-statistical-inference-for-linear-regression-models-without-intercept-in-R-tp2295193p2295247.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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, minimal, self-contained, reproducible code.
Re: [R] Correct statistical inference for linear regression models without intercept in R
Thank you very much for your effort! But is there a measure, which can compare the goodness of fit of regression models with and without the intercept? Can I only compare them in terms of sum of squares residual? -- View this message in context: http://r.789695.n4.nabble.com/Correct-statistical-inference-for-linear-regression-models-without-intercept-in-R-tp2295193p2295960.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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, minimal, self-contained, reproducible code.
[R] simple ts() object question
Dear Community, say, I have an annual ts() object sampled from 1960 to 1969 like: ta<-ts(1:10, start=1960, frequency=1) How can I extract the value from the year 1965? I mean, not by: ta[6] but by something like: ta[1965] where I'm directly referring to the year of the observation? Thank you in advance! -- View this message in context: http://r.789695.n4.nabble.com/simple-ts-object-question-tp2527085p2527085.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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, minimal, self-contained, reproducible code.
Re: [R] simple ts() object question
Thanks for the fast answers! -- View this message in context: http://r.789695.n4.nabble.com/simple-ts-object-question-tp2527085p2527222.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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, minimal, self-contained, reproducible code.