0
votes
0answers
3 views

Optimum value of minlev in function combine.levels

I have a dataset of 306967 rows and 23 columns, and I am building a regression model for predicting a factor based upon 6 other iid variables. Doing this I encountered an issue of large no of levels ...
0
votes
1answer
17 views

Estimating finite sample bias for Instrumental Variables

Are there ways to estimate the finite sample bias with instrumental variables? I guess this would be conditional on assuming some structure to the problem and also would involve simulation, but, at ...
0
votes
1answer
34 views

Power transformation using Box-Cox transformation

I have a dependent variable Cost and an independent variable VPT. I want to perform a power transformation on ...
2
votes
1answer
30 views

What exactly does the 'boxcox' function in R do?

I am familiar with the power transform family and I know how to estimate the MLE for $\lambda$ for given samples of a random variable. I have been using the 'boxcox' function in R for a sample of a ...
0
votes
1answer
25 views

What do the coefficients of the crossproduct of regression mean?

How can I interpret the coefficients of the crossproduct of each of the following codes? What do they mean? How can I deduce that they correspond to our expectation? ...
3
votes
2answers
101 views

Efficiency of beta estimates with heteroscedasticity

I need something clarified and that is when you have non-constant variance, estimates won't be biased but will be a problem when it comes to the S.E. formulas and efficiency. Therefore OLS estimates ...
0
votes
0answers
14 views

Model matrix of a mixed model

Suppose I have a mixed model like this: ...
2
votes
0answers
23 views

Plot and interpret ordinal logistic regression

I have a ordinal dependendent variable, easiness, that ranges from 1 (not easy) to 5 (very easy). Increases in the values of the independent factors are associated with an increased easiness rating. ...
2
votes
1answer
54 views

Remove effect of a factor on continuous proportion data using regression in R

I have a data set of continuous proportions which depend on a fixed-effect factor, e.g.: ...
0
votes
1answer
40 views

lm() function in R

This is kind of a follow-up question from this post: Gradient descent vs lm() function in R? Is there any literature available for the QR decomposition concept involved in the ...
1
vote
1answer
42 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
26 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
18 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
35 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
30 views

How to do Regression Discontinuity Design in R [closed]

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
23 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
33 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
54 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
167 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
55 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
73 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
25 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
57 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
56 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
54 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
31 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
87 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
41 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
28 views

What's wrong with my jackknife procedure in R? [on hold]

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
61 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
62 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
50 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
61 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
73 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: ...