1,927 questions
0
votes
1
answer
130
views
If I have a variable with 3 factors can I do an lm for the effect of all 3 factors individually but the interaction for 2 of 3 taken together?
Data:
rentsqm area location
40 4.830769 110 2
41 10.375799 64 3
42 4.168205 75 3
43 6.992405 54 2
44 7.450549 70 1
45 6.645718 71 1
46 10....
1
vote
1
answer
54
views
Why does enabling long mode throw the bootloader into boot loop and mess up GDT base when PM mode works fine without LM code?
Problem
I have a working PM code, but as soon as I add LM setup, the GDT base gets assigned a garbage address, cr registers don't load properly and I get into a boot loop.
I tried hard-coding the ...
2
votes
1
answer
109
views
Why is there a major difference in R-Squared between my models created with the same data? [closed]
I created two models using the lm() function in R. The first model, I created the design matrix for my prediction variable and then fed that into the lm() function.
copy <- data.frame(mtcars)
...
0
votes
0
answers
54
views
Event Study Design using OLS yields estimates despite no variance in outcome variable
I am running an event study design and get some unexpected behavior using OLS. One of my outcome variables is by definition zero before the treatment, i.e., whenever event time is weakly smaller than ...
0
votes
0
answers
27
views
Validity of forcing line through origin in multiple regression
I am trying to fit a multiple regression model to my data. I am testing the hypothesis that outcome Y is linearly related to independent variable X, while controlling for a linear relationship with ...
1
vote
1
answer
62
views
Error conducting regression (stepwise) AIC is -infinity for this model, so 'step' cannot proceed
This is my first consult, happy to share the community :) (You would notice I'm not a native english speaker and also I'm not very good using R, actually these are my firsts steps).
I'm trying to ...
0
votes
2
answers
98
views
Error leading to identical coefficients in R lm() function?
I am running an lm() in R, and I create the dataframe using a for{} loop. For most of the coefficients they are different, however two of them ConditionC_20 and ConditionC_22 are identical.
Below is ...
0
votes
1
answer
52
views
Stepwise Set of Independent Variable Enter Together
Is there a way in the stepwise procedure to control that a set of variables get added or removed as a group? Particularly, if I form a squared value of variable, that the linear and squared term would ...
0
votes
0
answers
44
views
R Trouble With Paste0 in lm [duplicate]
I am trying to use paste0 so that I can run a series of linear models (with a quadratic term), one for each independent variable.
Unfortunately, when I use the more complicated form (shown in last ...
0
votes
2
answers
101
views
Are there any faster rolling window regression packages in R? [closed]
This question comes up regularly, especially in the context of finance where one wants to calculate rolling exposures to factors, but there seems to be no answer. There are a number of R packages, ...
0
votes
1
answer
49
views
Error when trying to produce a residual panel plot using a polynom in an lm
I think I've encountered a bug when plotting diagnostic plots for models made with lm() including a poly() term using ggResidPanel::resid_panel().
df <- data.frame(x=rnorm(100),
y=...
0
votes
1
answer
59
views
Using map() with GAM model
I have a code that works if I am using LM but not if I am using a GAM. I guess the that for whatever reason LM looks inside object for the variable and GAM just looks at the names of the object but I ...
0
votes
0
answers
27
views
how to fix clang: error: -lm: 'linker' input unused [-Werror,-Wunused-command-line-argument]? [duplicate]
I downloaded homebrew, gcc14 and pasted the path on compiler.
Then it worked when I pasted the flags:
-DCMAKE_C_FLAGS="-Wall -Werror -pedantic-errors -lm -g"
But it didn’t build and showed:
...
1
vote
2
answers
131
views
Linear regression in R: Receiving different results based on dummy coding
I am performing a linear regression with one continuous predictor and one categorical (two levels) predictor. I have included the categorical factor as a named factor ("Control" and "BD&...
1
vote
1
answer
108
views
different R^2 depending on 2SLS and ivreg function (AER)
I want to run an IV regression in R using ivreg from the AER package. The output gives me a negative R^2 which should be impossible as far as I know. When running the same regression manually with ...