All Questions
Tagged with predictive-models generalized-linear-model
123 questions
2
votes
0
answers
35
views
How to model data where an individual could be in more than one group within the data, but is more likely to only appear once?
I have multiple cohorts of patients with different index symptoms/events, and am looking to predict cancer risk for each separate cohort, including certain covariates of interest to see which ...
1
vote
1
answer
37
views
Binary predictive classification in R, with predictors consisting of multiple values
I am struggling currently with constructing a binary glm predictive classifier, due to an issue with dimensionality.
I have a dataset of N samples where each sample has values for M entries (genes) ...
0
votes
0
answers
23
views
Which is the correct regression model for predicting the association of climate with Julian days nested within decades?
Below is a reproducible example:
...
2
votes
0
answers
17
views
Force GLM through zero [duplicate]
I am working on a glm model using a binomial distribution. I want to force the intercept through zero, as I know that biologically this makes sense. I have used the formula to ...
2
votes
0
answers
65
views
Which dependent variable is mostly impacted by predictor?
Usually one wants to identify the most important predictors (x1, x2, x3..., xn) in a regression model. My question is reversed: I have a data set that contains a risk factor risk and several outcomes ...
0
votes
1
answer
98
views
How can I calculate residuals of a dependent binary variable, using a glm (logistic) model that was fit on a different sample?
I have a data frame D1 in R with a dependent binary variable Response (0/1) and a set of covariates like age and gender. I want to know how "typical" ...
0
votes
0
answers
31
views
compare the outcome of logistic regression (predictive probabilities) before and after an event
To train a glm model, I'm using using clinical data (~10 features) of a large cohort of patients and healthy subjects. I'm using a smaller test group (around 20 people) and predict their outcome (...
0
votes
0
answers
246
views
Warning message: glm.fit: algorithm did not converge
GLM model raises a warning regarding glm.fit: algorithm did not converge. I have two ideas to solve the problem.
Force the initial model with a warning with stepAIC, then use the final model produced ...
0
votes
1
answer
216
views
Prediction of Pure Premium with offset
I'm modeling a pure premium with glm and using an offset term equal to log(exposure).
My question is, in R, what does ...
1
vote
0
answers
30
views
GLMs vs Time Series analyses [closed]
apologies for the dumb question but I’m a bit confused on using GLMs versus Time Series techniques.
Say I am interested in determining whether or not a particular year has a higher mean than a ...
0
votes
1
answer
209
views
prediction error in GLM
Can you please explain why this statement holds?
a distribution where the variance is proportional to the mean will better tolerate larger prediction errors occurring with larger predictions than one ...
3
votes
1
answer
2k
views
Gamma Regressor - Some value(s) of y are out of the valid range of the loss 'HalfGammaLoss'
I am trying to use GammaRegressor to predict the customer revenue in the next 3 months, 6 months etc.
So, I tried using the GammaRegressor based on suggestions from ...
1
vote
1
answer
3k
views
Regression for only positive values prediction
I already referred these posts here. Please don't mark it as duplicate. This post is continuation of my other post here. So, am not providing the full context here. You can refer the link here
a) Is ...
0
votes
1
answer
416
views
Meaning of residual vs. predicted quantile plots in DHARMa?
I am fairly new to statistics and R and I need a bit of help to understand the results of my GLM. I am using bee species richness as the response variable and plant species richness as the predictor ...
6
votes
1
answer
1k
views
Predict non-negative continuous variable between 0 to 100
I am working on a problem wherein I am trying to predict how much 'percentage a student will score exams' based on the 'number of hours the student study', 'number of hours the student play', 'student'...
3
votes
0
answers
138
views
Relationship between "Neural Networks" and the "Universal Approximation Theorem"
I have the following question about the relationship between the Neural Networks and the Universal Approximation Theorem:
For a long time, I was always interested in the reasons behind why neural ...
1
vote
1
answer
131
views
Is underdispersion problemetic for predictive poisson models?
I am modelling some count data and I suspect my data to be underdispersed. I intend to use the Poisson distribution so that I can use information criteria (BIC) for optimal variable selection. However,...
6
votes
3
answers
4k
views
Predicting with a GLM
I wanted to check my understanding of predicting with a GLM:
A binomial/logistic regression model predicts the binomial parameter = p = P(success). To convert the probability into classes, we have to ...
1
vote
2
answers
820
views
If I use 'quasipoisson' as family to GLM on non-integer data, can it be treated as poisson?
I'm trying to build a model based a data from package GLMsData
library(GLMsData)
data(lime)
my model is,
...
0
votes
0
answers
22
views
How can I improve my model's prediction based on test set accuracy socres?
Perhaps that's a bad way to phrase this question, but I'm much more of a coder than a statistician. I would really appreciate help on the following:
This pretty picture shows three predictions by my ...
0
votes
0
answers
89
views
Ensemble model predicts negative and extreme values for a non-negative response variable
I am using SuperLearner() in R to create an ensemble model composed of GLM, GAM, randomForest, gradient boosting model, and multivariate regression spline models. My response variable is tree density, ...
0
votes
0
answers
40
views
Statistical model for proportion/percentage
I would like to build a model that would predict a percentage/proportion from another percentage/proportion. More specifically I have medication adherence rates varying from 0 to 1. I can't use linear ...
0
votes
0
answers
832
views
Fitting a sigmoid model to my data and comparing parameters for different factors
I acquired data from 20 subjects for 4 different conditions (2 factors) with 14 different intensity levels, created using a log-space distribution. I would like to model the response for each ...
1
vote
0
answers
206
views
Can I use the minimum lambda.1se among 100 iterations of 10-fold cv.glmnet to tune the final model?
I am running 10-fold cross-validation(cv.glmnet) 100 times on a training dataset in R. The purpose of this process is to find the optimal lambda to tune the final model for my prediction model.
I did ...
8
votes
2
answers
1k
views
What is a partial chi-square statistic according to Frank Harrell?
In his RMS course (section 4.1.1), Frank Harrell mentions the use of a partial chi square statistic for measuring the strength of association between a predictor and an outcome. See below for a ...
0
votes
0
answers
661
views
What plot should I use? (glm predicted vs actual)
I have made a linear regression model (using the glm function) to predict the number of medals a country will win based on GDP. I have the data for the actual number of medals won.
I can't seem to ...
4
votes
2
answers
382
views
Prediction using a logistic regression model
Given a logistic regression model:
$y \in \{0, 1\}$
$ P(y=1|x;\theta) = h_{\theta}(x) = \frac{1}{1+\exp(-\theta^T x)}$
And given the value $\theta^*$ which maximises the conditional likelihood $P(y|X; ...
2
votes
2
answers
407
views
Which coefficients to include in out-of-sample prediction?
I am estimating a logistic regression on a subset of my data and predicting the outcome for the whole sample.
In the regression only some data are statistically significant at the chosen level. ...
0
votes
1
answer
662
views
chi square GLM inference
Suppose at $m$ different positions on a line $a_1,....,a_m$, we sample from a i.i.d normal distribution $N(\mu_i,\sigma_i^2)$, $n_i$ times for each of the $1\le i\le m$ different points. Here of ...
0
votes
0
answers
124
views
Interpreting GLM coefficients as multiplicative adjustments
I'm currently reviewing the provided solution for a GLM problem and I'm completely confused by the answers.
The training data is staged as such: ...
5
votes
1
answer
6k
views
How to use a GAM to predict the probability in binomial data as a function of predictors
I'd like to predict the probability of success as an unknown function of predictor variables. For example, consider the following fake data
...
1
vote
1
answer
64
views
Deciding between linear and non-linear approach in a predictive model when the relationship 'looks linear'
When we have a relatively small number of samples it is easy to see on a plot what is intuitively happening when we fit a regression line; we can see how far each of the individual sample points are ...
2
votes
0
answers
314
views
Negative binomial’s predicted counts are too high with skewed predictors
I am modeling count data (disease incidence) using negative binomial regression, and a couple of my predictors are extremely right-skewed. When I include these predictors, the model's predicted counts ...
0
votes
0
answers
260
views
How to calculate the survey mean with a categorical auxiliary variable in R "survey"?
When I use a continuous auxiliary varaible in svyglm, I can predict the mean of the dependent variable from the mean of the auxiliary variable (MRE below). How do I ...
0
votes
0
answers
24
views
Predict the injury time of a football match?
I have a project which requires me to predict the injury time of a football match. And I have the relevant information, such as goals, corners, referee, 2 team names and the injury time for each half.
...
2
votes
1
answer
2k
views
Error: coef/vcov not consistent with basis matrix
I am trying to understand predictions from distributed lag no linear models. I use trial data from R and I run a glm model with crossbasis matrix from DLNM package. When I am trying to get the ...
4
votes
1
answer
78
views
Does it make sense to build 2 models - one for prediction and one for inference?
I am considering using a Generalised Additive model for prediction and a Generalised Mixed effects model for inference to explain the relationship between variables, so I can play to the strengths of ...
0
votes
0
answers
48
views
Process for prediction and interpretation for custom linear regression model?
Let's say you want to build a custom linear model. For parameter estimation, we can do MLE, which can be solved using gradient descent.
To determine our coefficients, we can do bootstrap resampling. ...
1
vote
0
answers
414
views
Logistic Regression: how to reduce bias in data
I have a logistic regression model and my main goal is to predict probability of surviving using explanatory variables like age, gender etc. Each row in my data represents an individual and columns ...
0
votes
0
answers
59
views
Including interaction term without main term with possible aliasing
I'd like to model an interaction term between a continuous variable and categorical variable, while accounting for possible aliasing in the variables. I was wondering what the best way to do this was.
...
0
votes
1
answer
19
views
How to estimate model coefficients for option-like response: ie. response is related to variables in the form y = max( formula, 0)
Rewrite
Hopefully someone can point me to a resource on how to estimate the parameters I'm trying to model. I've had trouble giving a title to my question and googling for resources.
Suppose $y$ ...
1
vote
2
answers
3k
views
Compare predicted versus actual outcomes in a GLM
I read somewhere that you could compute a "residual value" for a GLM by taking the actual values of your response variable divided by the predicted value of that response variable.
For example, ...
1
vote
1
answer
679
views
Help testing the predictive quality of a binomial GLM (currently attempting using the "caret" package)
Hello world (sorry for the novel; if you read this, I appreciate it!),
I'm running into a question that is probably a mixture of how to approach a problem of modeling and the technical difficulties ...
0
votes
1
answer
774
views
Predicting outcomes with categorical predictors
My dataset is formulated in a contingency table. My predictor variables are categorical and my dependent variable is the number of observations observed. How do I predict outcomes and find residuals?
...
0
votes
0
answers
38
views
Estimating coefficients of a large categorical variable
I'm trying to fit a GLM model with a categorical variable with 400 categories, and I'd like to reduce the number of categories. There are some categories with a lot of data, and a lot of categories ...
2
votes
1
answer
164
views
Do good Cross-Validation results imply good QQ-plot results?
In Edward Frees' book Predictive Modeling Applications in Actuarial Science, Volume 2 the first chapter goes over how to build a frequency GLM model (using a Poisson distribution) on sample auto-...
0
votes
0
answers
406
views
Predicted probabilities very close to 0 and 1 in GLM model
I've added new attributes to the binary GLM model. AUC climbed to 98%, logistic loss decreased to 0.45. Training set has ~50 cases.
I can see that predicted probabilities are extremely close to 0 and ...
2
votes
0
answers
153
views
Why Standard Deviation equal to 0 by GLM prediction?
This is my dataset:
...
4
votes
1
answer
6k
views
Get equation from glm coefficients: calculate y manually?
I am trying to understand the math behind the glm(). Specifically, how to apply equation based on model predictors to calculate my ...
1
vote
1
answer
107
views
To determine variables to figure out the bad customers in credit risk modeling [closed]
I am developing a probability to default model on a data from landing firm. After running the GLM() model i have got the below message:
...