Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 25965

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

0 votes

R squared change multiple linear regression

Why not computing all the nested models ? lm(var ~ VAR1) lm(var ~ VAR1 + VAR2) lm(var ~VAR1 + VAR2 + VAR3)
PAC's user avatar
  • 934
5 votes
1 answer
4k views

Generalized method of moments versus standard least squares estimation

thinking that in a very standard case such as a simple linear model with iid errors and no endogeneity, I would get the same results using the a simple least square estimate (such as provided by lm() in R) … I've just run the following simulation in R to compare the results of the lm() function and of the gmm() function : > library("gmm") > set.seed(1234567) > N <- 1000 > dd <- data.frame(id = 1:N) > dd …
PAC's user avatar
  • 934
22 votes
2 answers
83k views

Does it make sense to use a date variable in a regression?

I'm not used to using variables in the date format in R. I'm just wondering if it is possible to add a date variable as an explanatory variable in a linear regression model. …
PAC's user avatar
  • 934
4 votes
Accepted

Compare 2 regression lines in R

You have to use a Chow test (wikipedia). It's an application of the Fisher test to test the equality of coefficients among two groups of individuals. You can compute it easily using the sum of squared …
PAC's user avatar
  • 934