Linear regression model with (categorical) predictor variables The Next CEO of Stack Overflow2019 Community Moderator ElectionNeural Network Timeseries Modeling with Predictor VariablesTime Series Machine Learning Feature Selection ProblemWhy after adding categorical data the Linear Regression fails?Handling categorical variables in linear regression and random forestcustomer segmentation with categorical variablesLinear Model for Linear RegressionRegression model for continuous dependent variable and count independent variablesIntuitive Explanation of R-squaredGet insights from Random forest::Variable Importance analysis
Preparing Indesign booklet with .psd graphics for print
On model categories where every object is bifibrant
What is the result of assigning to std::vector<T>::begin()?
What does convergence in distribution "in the Gromov–Hausdorff" sense mean?
How do I go from 300 unfinished/half written blog posts, to published posts?
Can I equip Skullclamp on a creature I am sacrificing?
Is it ever safe to open a suspicious html file (e.g. email attachment)?
Is it possible to search for a directory/file combination?
Return the Closest Prime Number
Non-deterministic sum of floats
Why does standard notation not preserve intervals (visually)
Can we say or write : "No, it'sn't"?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Is micro rebar a better way to reinforce concrete than rebar?
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
At which OSI layer a user-generated data resides?
Why does the UK parliament need a vote on the political declaration?
Why do remote companies require working in the US?
Why am I allowed to create multiple unique pointers from a single object?
Why do airplanes bank sharply to the right after air-to-air refueling?
How does the mv command work with external drives?
Unreliable Magic - Is it worth it?
What happened in Rome, when the western empire "fell"?
Why has the US not been more assertive in confronting Russia in recent years?
Linear regression model with (categorical) predictor variables
The Next CEO of Stack Overflow2019 Community Moderator ElectionNeural Network Timeseries Modeling with Predictor VariablesTime Series Machine Learning Feature Selection ProblemWhy after adding categorical data the Linear Regression fails?Handling categorical variables in linear regression and random forestcustomer segmentation with categorical variablesLinear Model for Linear RegressionRegression model for continuous dependent variable and count independent variablesIntuitive Explanation of R-squaredGet insights from Random forest::Variable Importance analysis
$begingroup$
I used LM model with (categorical) predictor variables on my data in r like this (I have count variable as dependent/target variable):
# Fit linear model to total viewing:
fit <- lm(
total_viewing_minutes ~ panelist + sex + internet + education,
data = cln
)
If I understood correctly in r the first category is always the reference one so has by definition a coefficient of 0.
So by looking at the model result, is 68.3 minutes (intercept) average time viewing of
Panelist0 + sex1 + internet1 + education1
and by taking into account the term Panelist1
the 68.4 + 17.6 is avg time viewing of
Panelist1 + sex1 + internet1 + education1
is that correct interpretation?

machine-learning r linear-regression categorical-data
$endgroup$
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
$begingroup$
I used LM model with (categorical) predictor variables on my data in r like this (I have count variable as dependent/target variable):
# Fit linear model to total viewing:
fit <- lm(
total_viewing_minutes ~ panelist + sex + internet + education,
data = cln
)
If I understood correctly in r the first category is always the reference one so has by definition a coefficient of 0.
So by looking at the model result, is 68.3 minutes (intercept) average time viewing of
Panelist0 + sex1 + internet1 + education1
and by taking into account the term Panelist1
the 68.4 + 17.6 is avg time viewing of
Panelist1 + sex1 + internet1 + education1
is that correct interpretation?

machine-learning r linear-regression categorical-data
$endgroup$
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
$begingroup$
I used LM model with (categorical) predictor variables on my data in r like this (I have count variable as dependent/target variable):
# Fit linear model to total viewing:
fit <- lm(
total_viewing_minutes ~ panelist + sex + internet + education,
data = cln
)
If I understood correctly in r the first category is always the reference one so has by definition a coefficient of 0.
So by looking at the model result, is 68.3 minutes (intercept) average time viewing of
Panelist0 + sex1 + internet1 + education1
and by taking into account the term Panelist1
the 68.4 + 17.6 is avg time viewing of
Panelist1 + sex1 + internet1 + education1
is that correct interpretation?

machine-learning r linear-regression categorical-data
$endgroup$
I used LM model with (categorical) predictor variables on my data in r like this (I have count variable as dependent/target variable):
# Fit linear model to total viewing:
fit <- lm(
total_viewing_minutes ~ panelist + sex + internet + education,
data = cln
)
If I understood correctly in r the first category is always the reference one so has by definition a coefficient of 0.
So by looking at the model result, is 68.3 minutes (intercept) average time viewing of
Panelist0 + sex1 + internet1 + education1
and by taking into account the term Panelist1
the 68.4 + 17.6 is avg time viewing of
Panelist1 + sex1 + internet1 + education1
is that correct interpretation?

machine-learning r linear-regression categorical-data
machine-learning r linear-regression categorical-data
asked Feb 22 at 18:16
AnnAnn
61
61
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Your interpretation is correct. I would also add that if Panelist1 increases by 1 unit and the other predictors are held constant, then the average increase in the response variable is 17.557 minutes.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46054%2flinear-regression-model-with-categorical-predictor-variables%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Your interpretation is correct. I would also add that if Panelist1 increases by 1 unit and the other predictors are held constant, then the average increase in the response variable is 17.557 minutes.
$endgroup$
add a comment |
$begingroup$
Your interpretation is correct. I would also add that if Panelist1 increases by 1 unit and the other predictors are held constant, then the average increase in the response variable is 17.557 minutes.
$endgroup$
add a comment |
$begingroup$
Your interpretation is correct. I would also add that if Panelist1 increases by 1 unit and the other predictors are held constant, then the average increase in the response variable is 17.557 minutes.
$endgroup$
Your interpretation is correct. I would also add that if Panelist1 increases by 1 unit and the other predictors are held constant, then the average increase in the response variable is 17.557 minutes.
answered Feb 27 at 22:08
N. AgarwalN. Agarwal
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46054%2flinear-regression-model-with-categorical-predictor-variables%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown