The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

Hi so if rephrase the question, its How to do modelling on an unbalanced data right. There are multiple approchrs to these kind of problem. Under sample the Major variable to drop down total distribution inline with lowest Oversample lowest distribution to match it in line with highest available destribution. Synthetically induce data But if you are ...


1

I find McElreath's explanation in Statistical Rethinking 2nd edition completely satisfying (and helpful to understand why these two are so commonly conflated). Essentially, both predictive and explanatory models are addressing two different meanings, or problems, of prediction. The first, associated with predictive models, addresses the 'raw' problem of ...


1

Your question rightly acknowledges that throwing away cases can lose useful information and power. It doesn't, however, acknowledge the danger in using regression as the alternative: what if your regression model is incorrect? Are you sure that the log-odds of outcome are linearly related to treatment and to the covariate values as they are entered into ...


0

Yes it can and you can encode it using an indicator variable. Basically you have a variable that is 1 when the data point is in a certain category and 0 if it is not. Wikipedia provides a nice explanation and example: https://en.wikipedia.org/wiki/Dummy_variable_(statistics) For a more specific example/elaboration please see here: https://newonlinecourses....


0

Yes, they can be categorical ... as in all linear and generalized linear models. In fact, you can continue generalizing/extending the family of regression models, and it will still be true. As long as your model uses a matrix of predictor variables, all the coding trick you have learnt for usual linear regression can be applied. You can represent categorical ...


0

I agree with the above answer, and I would like to add more information in a form of a succinct summary. Baron and Kenny's (1986) method of testing mediation has been extensively applied, but there are many papers discussing severe limitations of this approach, which broadly include: 1) Not directly testing the significance of an indirect effect 2) Low ...


1

This is still not entirely clear, and you have many research objectives for the design. Some might be difficult to investigate with this design. Some points: I will assume analyzing only one response at a time, so three analyzes for each of the responses. Maybe some questions need a multivariate analysis, but anyhow you should start with the univariate ...


0

I am assuming that categorical variable with 100s of levels code the different items. You can certainly do that, and build a logistic regression model, probably using some form of regularization, maybe fused lasso, see Principled way of collapsing categorical variables with many levels?. That will give a model with a separate intercept for each item, but ...


1

In your particular case, I see no reason to use simple linear regression instead of multiple linear regression. Sex is clearly an important variable. But see below. However, in general, you sometimes have only one independent variable and, then, you use simple linear regression by definition. Other times, you investigate a model with several potential ...


0

Why not just try it? I can see no problems with school size as a predictor, and in studying bullying it might just be that small and large schools are different ... You say yourself My understanding of such a predictor is that it is one that does not change at the pupil level, only at the school level (so it's constant across all pupils in each ...


0

You should search for papers using the R package gamlss. Some few is https://www.sciencedirect.com/science/article/pii/S030917081000062X, https://www.hydrol-earth-syst-sci.net/17/3189/2013/hess-17-3189-2013.pdf, https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/1471-2288-8-59. A google scholar search.


0

The question is not entirely clear, and for a good answer some context would be helpful. Can you provide it? What are you modeling, what does your variables represent, can you actually state your model? --- with formulas? Waiting for that, it sounds you are coping with heteroskedasticity, with lower variance around the smaller (close to zero) values. Then ...


2

Can AIC and BIC be used on the left-out fold in a 10-fold cross-validation? No, that would not make sense. AIC and cross validation (CV) offer estimates of the model's log-likelihood* of new, unseen data from the same population from which the current data sample has been drawn. They do it in two different ways. AIC measures the log-likelihood of the ...


1

I agree with Kjetil's answer, if you have age in years available. If age was already binned into 5 categories, then splines probably won't work well as there are very few choices for the knots. You could try optimal scaling. This is available in the R package optiscale and in SAS PROC TRANSREG and probably in some other packages as well. But binning ...


2

My recommendation: use age in years as is, without any binning, and represent it with regression splines. Or Try generalized additive models (GAMs.) See for instance Are both of these generalized additive models? (and search this site, many posts.) One post with simple R code is Violation of linearity assumption in Logistic Regression.


1

This question seems to be about both modeling, ethics and cooperation/communication difficulties. There are some important comments that I cite here: Could you explain why you need to perform this Procrustean feat of shoehorning a five-point response into a four-point scale? – whuber Regardless of the size of the customer, if they ask you to do ...


Top 50 recent answers are included