0
votes
1answer
40 views

Conditional expected value from a regression model using ordinary least squares

I have a query regarding part (a) of the following question. I cannot figure out how to calculate the conditional expected value of collections for the month of Easter. Is it not possible to calculate ...
0
votes
0answers
23 views

Setting indicator variables to equal 1 or 0 [migrated]

I have to set HIGPA to equal 1 if the gpa is greater than 3, and if it is less, then HIGPA must equal 0. I am using R. gpa is already a variable in the data. HIGPA is not. So far I have made HIGPA a ...
0
votes
1answer
22 views

How do I derive slope and intercept for each group in regression model with a categorical and 2 continuous predictor variables?

$IQ = b_0 + b_1Group + b_2Age + b_3Income + b4\times Group\times Age$ Group is dummy coded ($0,1$) I assume that the interaction of Group x Age tests the group difference in the slope of the IQ vs. ...
0
votes
0answers
17 views

Prepare data for generalized linear regression [migrated]

I want to perform glm for the dataset Titanic in R. I did the following steps to prepare the data and run glm ...
0
votes
0answers
35 views

Multiple Regression questions (restricted regression, dummy variables)

Q1. Model 1: $Y=X_1\beta_1+\varepsilon$ Model 2: $Y=X_1\beta_1+X_2\beta_2+\varepsilon$ (a) Suppose that Model 1 is true. If we estimates OLS estimator $b_1$ for $\beta_1$ in Model 2, what will ...
0
votes
1answer
30 views

spss: working with two binary/dummy variables

Am trying to set a few binary/dummy variables against each other, i.e. propensity_to_dance and gender. I assume that it' ok to ...
0
votes
1answer
49 views

When is it valid to include interaction terms in a regression model? [duplicate]

I am using logistic regression to analyze some categorical data (binary response variable and categorical -- mostly binary -- predictor variables). For my model, I have something like ...
3
votes
1answer
142 views

Interpreting interaction terms in logit regression with categorical variables

I have data from a survey experiment in which respondents were randomly assigned to one of four groups: ...
0
votes
1answer
62 views

Regression using dummy variables

I am working on a credit scoring modelling project and we decided to use dummy variables for regression. The way we create dummy variables are: For each predicting numeric variable, We create by ...
1
vote
1answer
34 views

Categorical or continuous variable?

Suppose that in a linear regression, some of the continuous variables (such as number of pills taken each day) have small discrete values. For e.g. the number of pills taken each day can take values ...
1
vote
2answers
44 views

Attempting to investigate a relationship between one variable and another that has three possible values

I'm looking to investigate the relationship between a series of variables on a recurring basis. One variable will always be the dependent variable, and will take three possible values: ...
2
votes
2answers
38 views

Categorical model

Suppose you have a table: Smoking Death Low Moderate High Yes 50 100 150 No 4 10 14 I know a chi square test is best an determining the ...
0
votes
1answer
46 views

Alternative to LPM and logit regression in Stata

I'm dealing currently with complex dataset that was already tested with Linear probability model and logit regression. I'd like to find an alternative for original regressions. The sample uses a ...
1
vote
2answers
92 views

Inconsistent beta values in regression analysis due to change in categorical coding

I have three terms in my regression models: gender (categorical data), centeredmeanB (quantitative data) and the interaction term gender * centeredmeanB. I noticed than the way I coded gender ...
2
votes
0answers
59 views

Swapping X and Y in a regression that contains a grouping predictor?

Suppose I'm doing a linear regression and I want to investigate how the association between a predictor X and a response Y changes according to levels of a 2-level factor G. The model would look like ...
3
votes
3answers
264 views

How to do regression with effect coding instead of dummy coding in R?

I am currently working on a regression model where I have only categorical/factor variables as independent variables. My dependent variable is a logit transformed ratio. It is fairly easy just to run ...
1
vote
1answer
104 views

RandomForest factor with too many levels

I have a model with about 200,000 training observations, where I am regressing, with 4 factors and 2 continuous variables. One of my features has 927 levels, which is causing the R implementation of ...
7
votes
2answers
161 views

How to model number of days in the last week smoking cigarettes (0 to 7 - 'U' shaped)?

I am currently analysing data where the outcome variable is 'U' shaped. The outcome variable asks 'how many of the last seven days have you smoked'. Most responses to this fall in the first (none) and ...
3
votes
1answer
102 views

Building separate logistic regression models for each categorical variable

I am building a binary logistic regression model. I am not sure if using the variables as interactions is a better choice than building separate models for level of a categorical variable. Is there a ...
2
votes
1answer
176 views

How does anova.lm in R calculates “Sum Sq”?

I'm learning R and trying to understand how lm() handles factor variables & how to make sense of the ANOVA table. I'm fairly new to statistics, so please be ...
2
votes
3answers
358 views

Non-significant intercept in regression with a two level factor in R

I have a linear regression with two explanatory variables. One of them is a two level categorical variable. When I perform the fit, R tells me that the intercept is highly non significant. When I ...
1
vote
0answers
58 views

Which non-parametric model / test to use with a mix of quantitative and categorical variables?

My response variable $Y$, number of nodes, is quantitative discrete (only positive values), while my 2 covariates are $X1$, number of days (quantitative discrete), and $X2$, city (categorical variable ...
2
votes
3answers
344 views

Dummies, clustered standard errors or both?

Relative novice here. I am running a regression on an observational setting in which Y is the outcome and D is the treatment indicator. Observations are drawn from 3 different geographic groups ...
5
votes
1answer
163 views

Non-intuitive answer from a Poisson regression

I am not very familiar with Poisson regression, so I think I must have made a mistake in the below analysis: I am studying the effects of smoking on lung cancer rates. The dataset is provided here. ...
2
votes
1answer
90 views

Regression - significance of a variable

I have been running a linear regression, and one of the variables was a discrete variable (3 categories), decoded into three binary variables. I ran the regression in Stata. The first of those three ...
3
votes
1answer
125 views

Does it make sense to cut a continuous variable to intervals?

I'm trying to fit a two-class logistic model, using many many features. When inspecting one of the features, I binned it so I could inspect its behavior. In each bin I count the number of 'good class' ...
2
votes
1answer
106 views

Accounting for categorical variable in only a few observations

OK, I feel stupid asking this, but I am positive you all will know exactly what I should do here. I have a simple regression situations (small sample sizes; n=13-18), and a few observations that ...
2
votes
2answers
491 views

Plotting logistic regression interaction (categorical) in R

Hello I have the following logistic model with a categorical variable interaction which I wish to plot in R but I am struggling to find any solutions - ...
3
votes
2answers
150 views

Dummy's, significant and not significant

I have in my model two dummy's, for a categorical variable with 3 categories (native, EU-immigrant and non-EU-immigrant). The reference category is 'native'. These are merely control variables. Now ...
0
votes
0answers
76 views

How to determine if categorical variable stays in building statistical model?

I am currently building my model and I have chosen to use a step-wise backwards elimination method. I have many categorical variables and am using the "CLASS" statement in SAS within my regression ...
1
vote
1answer
215 views

Should I use ANCOVA or multiple regression with dummy variables?

I am writing a manuscript using an experimental design which predicts interactions between 1 continuous variable and multiple dichotomous variables, all predicting a continuous variable. As is ...
4
votes
1answer
144 views

Comparing minitab output to R

I am trying to recreate analysis of diamond data in R and compare it to minitab output cited in http://www.amstat.org/publications/jse/v9n2/datasets.chu.html I'm almost certain its the same data set ...
0
votes
1answer
69 views

Can I test all possible contrasts in a regression with a categorical explanatory variable?

I need to run a logistic regression with a binary response variable and a categorical explanatory variable. My explanatory variable has 3 levels: Forest Plantation1 Plantation2 I would like ...
3
votes
1answer
216 views

Normalization of categorical factor variables

For supervised machine learning for prediction, if I had some feature variables that are real, and also some features that are categorical--which have been coded using dummy variables (010, 001 ...
5
votes
2answers
497 views

Is multicollinearity implicit in categorical variables?

I noticed while tinkering with a multivariate regression model there was a small but noticeable multicollinearity effect, as measured by variance inflation factors, within the categories of a ...
0
votes
0answers
55 views

Exclusive categories and multivariate regression

I am doing a regression analysis where several of my independent variables are categorical measures of severity. I code them as dummies and exclude the least severe variable. The more severe the ...
0
votes
4answers
1k views

How to justify the use of categorical variables as continuous variables in logistic regression?

One question again to be clarified: Can I use the variables as noted below [(3) a,b,c etc] as continuous variables in my logistic regression and if so what will be my explanation in the paper that I ...
2
votes
1answer
256 views

What is the role of a categorical predictor in polynomial regression?

I understand that there is a function in R called poly() that can generate orthogonal polynomials--useful for applying on input variables before running a ...
5
votes
3answers
527 views

How to control for market return in an (SPSS) OLS?

Please consider the following panel dataset: ...
1
vote
2answers
793 views

SPSS dummy variables in OLS

I have a timeseries dataset holding stock data for a large set of companies. Assume the following subset, where obsDay is the observation day (148 days in reality) ...
3
votes
1answer
63 views

How to handle news coverage ratio in a regression analysis?

I have collected data from Twitter, Google and Wikipedia to look for any correlations (and perhaps predictive value) against the stock market. I have collected daily Twitter, Google and Wikipedia ...
2
votes
3answers
407 views

Comparing two groups: one-way ANOVA vs. regression analysis with dummy

I am a bit puzzled with the following issue: the outcome of one-way ANOVA test shows that the mean difference of variable y between two country samples is statistically significant. However, after ...
0
votes
2answers
245 views

How to control for industry effects in regression?

Right now I'm working on an analysis of influence of cultural aspects on investment mode preference. However I have to control for many other factors, for example industry, since some industries, for ...
1
vote
1answer
485 views

SAS for regression with categorical and quantitative explanatory variables

I am analyzing growth over time for 5 different cultivated forms (cultivars) of maize. Graphing the data reveals a clear linear pattern for all the cultivars in the time interval I am interested in. ...
0
votes
1answer
198 views

How to perform linear regression with categorical factors? [duplicate]

Possible Duplicate: How to test the statistical significance for categorical variable in linear regression? I need to perform a multiple regression analysis. My dependent variable or ...
2
votes
1answer
1k views

How to test the statistical significance for categorical variable in linear regression?

If in a linear regression I have categorical variable... how do I know the stastical signifance of the categorical variable? Let's say the factor $X_1$ has 10 levels... there will be 10 different ...
2
votes
2answers
271 views

Regression with categorical factor variable and the correlation among the variables

lm(y~x1 + x2 -1) where x1 is a continuous numerical variable and x2 is a categorical ...
2
votes
0answers
362 views

dummy variables with overlapping categories?

I'm quite familiar with traditional dummy variable coding - code 1 for presence of the attribute and 0 for absence. A multi-category variable is then represented by a series of dummy variables while ...
4
votes
2answers
681 views

Ordered logit with (too many?) categorical independent variables

I am doing some inferential analysis on some ordered dependent variables (about 70). Their scales range from 4-10 possible (ordered) responses. To give some context, it's all social data--happiness, ...
3
votes
2answers
131 views

Coefficient estimated with a binary predictor $\in \{0,1\}$, but making predictions with values between $0$ and $1$ - is this OK?

Let's say I have a variable $x_d$ that, in the estimation data, is a simple indicator ($x_d \in \left\{0,1\right\}$). I estimate a coefficient for it, $\beta_d$, along with several other coefficients ...

1 2