1
vote
0answers
15 views

Building a time series model using more than independent variables

I am working on a project, and I am totally new to statistics. I have sales data for last two years at week level, along with other variables like temperature, holiday (TRUE/FALSE), where holiday are ...
4
votes
0answers
24 views

R packages that work with biased samples

I'm working with a biased sample of web users. I'm only able to track responses of users who have navigated my site in a certain way, and I'd like to run an analysis to determine how certain factors ...
2
votes
0answers
9 views

Evaluate deviation from negative binomial model

I'm trying to figure out how to determine to what extent a sample deviates from a negative binomial model fitted to a larger population. As an example, I generated counts of doctor visits for a ...
0
votes
0answers
10 views

Construct matrix of stacked variables in VAR regression

I am trying to NOT use packages for the estimation of models in order to have a deeper understanding of how things work. Currently, I am trying to estimate a VAR(1) (vector autoregression of first ...
0
votes
0answers
22 views

Help interpreting R linear model fit [duplicate]

I have observed variables power$values. I am trying to model this process using a second set of observations, such that $P = M\cdot X + B$. $P$ is the function ...
1
vote
2answers
31 views

what does the correlation of Random forest regression tool in R represent

I've built a random forest model (regression model) using randomForest package in R, and I calculate the correlation between the predicted values and the actual ones in order to know how the trained ...
0
votes
0answers
29 views

How to do Regression Discontinuity Design in R [on hold]

I am having trouble with doing regression discontinuity design in R. Could anyone show me a syntax for R to do RDD? The exercise I have is y= wealth x=winning margin covarites= education, past ...
0
votes
0answers
22 views

Problem with year as a factor GLMM

So I need to do a GLMM, I do it this way, with package lme4 glmer(y~x1+x2+x3+year+(1|x4),family=binomial In my data, year is a factor (4 levels). So when I run my glmer, I have my result like this x1 ...
1
vote
0answers
30 views

Fit a GARCH (1,1) - model with covariates in R

I have some experiences with time series modelling, in the form of simple ARIMA models and so on. Now I have some data that exhibits volatility clustering, and I would like to try to start with ...
0
votes
0answers
18 views

How to fit a model for a censored binary outcomes?

Suppose I have a data frame such that: ...
2
votes
0answers
71 views

How to get the regression from a plot?

I have a dependent variable C and an independent variable VPT. VPT is the average volume per ...
1
vote
1answer
53 views

Interpretation of Maximum likelihood estimation

I have some problem to interpret the result of MLE estimation : Is it possible to get some advise about how to interpret it? the log likelihood function : $\sum^{n}_{i=1}\log\left( \phi\left( ...
9
votes
1answer
159 views

Testing whether two regression coefficients are significantly different (in R ideally)

If this is a duplicate question, please point to the right way, but the similar questions I've found here haven't been sufficiently similar. Suppose I estimate the model $$Y=\alpha + \beta X + u$$ ...
1
vote
2answers
51 views

Homoscedastic and heteroscedastic data and regression models

How to understand the homoscedasticity and heteroscedasticity in context of regression models? Is there a way to check these properties in R?
4
votes
2answers
69 views

How do I run Ordinal Logistic Regression analysis in R with both numerical / categorical values?

Base Data: I have ~1,000 people marked with assessments: '1,' [good] '2,' [middle] or '3' [bad] -- these are the values I'm trying to predict for people in the future. In addition to that, I have some ...
0
votes
0answers
24 views

How to estimate the effect of changes happened in employee designation/title on salary?

Is it possible to estimate the beta changes corresponding to employee's departmental change or title change or Both. Can i follow linear regression directly to calculate slope ? I am using R ...
0
votes
2answers
56 views

Variable Selection [duplicate]

I am using R/RStudio to code a regression (and to optimize the function) over 50+ different variables. For the optimization to work I need to fit a higher order function (I am not sure to what degree ...
0
votes
1answer
25 views

Investigating relationships between variables- multiple and simple linear regression

please help a sociologist struggling to get to grips with R and statistics in general..! I've got a data set with 11 variables. I need to investigate the possible relationships between one of the ...
3
votes
1answer
55 views

Understanding coefficients in summary output of logistic regression in R

This question is about understanding the logistic regression output using R. Here is my sample data frame: ...
0
votes
1answer
39 views

comparing R-squared and F-stat

I am doing multiple regression with Gas production (l/d) as response variable, and flow rate (l/h) and COD influent (g/l) as explanatory variables in R. I made two models. ...
0
votes
1answer
50 views

Interpreting the “coefficient” output of the lm function in R

I have created a linear model (which has multiple predictors) using the lm() function and I would like to interpret the "coefficients" that I get when I use the summary() function on the linear model. ...
0
votes
0answers
11 views

Standardizing the variables [duplicate]

I am working with an anaerobic treatment plant where I have got main 3 variables, gas production (l/d), flow rate (l/h) and COD influent (g/l). if I want to do multiple l.regression, is it necessary ...
0
votes
1answer
52 views

Extracting the model p-value for a multiple regression in R

When fitting multiple variables to one outcome via the lm() function in R, summary(lm) gives me the p-values for individual ...
2
votes
0answers
30 views

Neural Network Error Plot Odd Effect

I'm using R to fit a neural network to data generated by the formula $y = x^2 + \epsilon / 2$ where $x \sim \mathcal{U}(0, 2)$ and $\epsilon \sim N(0, 1)$ (very simple, right?). The following plot ...
2
votes
1answer
84 views

How important is the correlation coefficient's variance in linear regression?

R doesn't return the correlation coefficient's variance (or standard error) when coding summary(linmod), linmod being a linear ...
2
votes
1answer
39 views

The effect of ommission of relevant variable in the regression model on adjusted $R^2$

Let's say I have two regression models (I) $y_t=\beta_1+\beta_2 x_2+u_t$ (II) $y_t=\beta_1+\beta_2 x_2+\beta_3 x_3 + u_t$ How the omission of relevant variable (not irrelevant variable) affects ...
0
votes
0answers
25 views

What's wrong with my jackknife procedure in R?

Well, the reason I think my jackknife procedure is wrong is that it gives me the same graph as the residuals. Here's the problem description: Use a loop to create n=50 models. In step i, make a model ...
2
votes
2answers
59 views

Same dataset analysed with four different linear models

I've analysed the same dataset (diamonds from ggplot2) in R with four linear models. Each model has a different error structure. ...
0
votes
0answers
17 views

How to predict logistic model by accounting for the error distribution?

Suppose I have a logistic model such that: ...
2
votes
0answers
17 views

3D plot of the residual sum of squares in linear regression [migrated]

I'm trying to reproduce Figure 3.2 from the book Introduction to Statistical Learning. Figure describes 3D plot of the residual sum of squares (RSS) on the Advertising data, using ...
1
vote
1answer
58 views

What is the meaning of the beta-coefficient for an interaction term in a crossover study?

I have asked a similar question here: stackoverflow I am puzzled by the interpretation for an interaction term. In my data my Y is an interval variable with the health outcome of an experiment. I have ...
0
votes
0answers
48 views

How do I get coefficients of a random forest model?

I am using randomForest to generate a model, and at the end I don't know how I can get the final coefficients that the model is fitting. I know that for linear ...
0
votes
0answers
6 views

Ideas to re-write looping regression with 'for' loops [migrated]

I'm having a brain freeze, and hoping one of you can point me in the right direction. My end goal is the output of various regression coefficients (mainly interested in price elasticity), which I ...
0
votes
1answer
42 views

How to find which time series is trending more?

Let us say I have two sets of time varying series as shown below: ...
0
votes
0answers
50 views

Treating numeric as categorical variable in regression

I need a little bit of help and confirmation that I have the right idea. I have some fake data of 8 tribes; within each tribe members work hard to gain food for their own tribe. No one can speak to ...
0
votes
1answer
19 views

How to retrieve the prediction matrix according to the formula of a regression model in R?

Suppose I have a logistic regression model such like this: ...
2
votes
1answer
48 views

Imbalanced training dataset and Random Forest regression model

I have a large dataset (>300,000 observations) that represent the distance (RMSD) between proteins. I'm building a regression model (Random Forest) that is supposed to predict the distance between any ...
2
votes
1answer
58 views

How to draw estimates based on variance covariance matrix?

Suppose I fitted a logistic model and get the estimates as well as their vcov matrix. I would realize this: draw length($\beta_s$) independent $\mathcal N(0,1)$ ...
0
votes
0answers
71 views

Difficult interpreting linear mixed model result - R lme function

I'm fitting an harmonic regression model on data from different plants separately as follows: ...
1
vote
1answer
26 views

Mechanism of multiple imputation?

I am trying to understand the mechanism underline multiple imputation ideas. I am confusing on creating multiple sets of estimates and then average them. For example: ...
3
votes
0answers
20 views

Using residualized predictors outside the linear model context

Can anyone point me towards a good explanation of when a residualized variable in a regression will give you the same answer as using a non-residualized variable with controls? For instance, say I ...
0
votes
0answers
40 views

Robust regression goodness of fit

I'm using R to compute robust multiple linear regression. I use the command rlm from the package MASS. As psi function I use ...
1
vote
1answer
164 views

Visualizing large dataset with multiple subgroups

I have a large data frame in the following form (I apologize for this formatting): ...
4
votes
1answer
53 views

Residual Vs. Fitted Plot with Outliers

I have a model relating fuel consumption to other vehicle parameters, which produces the following Residuals Vs. Fitted plot. My Question: Is the skew to the right simply an indication of outliers ...
0
votes
1answer
40 views

Quadratic (programming) Optimization : Multiply by scalar

I have two - likely simple - questions that are bothering me, both related to quadratic programming: 1). There are two "standard" forms of the objective function I have found, differing by ...
2
votes
0answers
72 views

Testing for overdispersion in logistic regression

R in Action (Kabacoff, 2011) suggests the following routine to test for overdispersion in a logistic regression: Fit logistic regression using binomial distribution: ...
0
votes
1answer
31 views

Predicting based upon categorical data and one Numeric datatype

I would like to determine what variables from this sample data would be best predictors for CallHandleTimeSeconds. Im thinking it would be a combination of CreditRating, EligibleForAssistance, ...
3
votes
0answers
51 views

R: Problem with NaNs in gamma regression using glm

I have found a problem with NaNs when I try to fit the model from example 5.1 in the book Generalized Linear Models. With Applications to Engineering and Life ...
3
votes
2answers
45 views

Weighted Linear Regression R

Can anyone expalin to me in simple terms what happens when we use weights in regsubsets or lm in R? What effect do weights have ...
0
votes
0answers
11 views

calculate r-squared with known parameters

I'm trying to do something a little odd. I have used Akaike's Information Criterion to select the top four models of Growth Rate (using different combinations of 11 variables). I then used the package ...