All Questions

178,293 questions
Filter by
Sorted by
Tagged with
4 views

Comparing the marginal effect of a GLM to the OLS estimates

My question is, whether there is any way to (somewhat) compare the marginal effect of a GLM estimate to an OLS estimate. As in, "since the OLS and GLM results are very similar, I will favour OLS ...
7 views

SARIMAX Exog doesn't work well at all?

I'm working with demand forecasting and we are using Statsmodels SARIMAX on a regular basis. One thing we have noted is that the model doesn't seem to listen much at all to the EXOG argument to which ...
3 views

Multiple output neurons, mini-batch and MSE loss. Is this setup ever valid? What n refers to in the loss function?

This is probably very basic question. Given the following ANN architecture with the output layer width $k = 2$: And the loss function: $$MSE={1 \over n} \sum_{i=1}^n (Y_{i} - \hat{Y_{i}})^2$$ Does ...
3 views

How do I add back the seasonal trend?

I worked on to predict the future values of my model but as they had a seasonal trend I had to do a lag differencing of lag=7. But now how do I add back that trend to get original values.
4 views

Comparing the marginal effects of glm output to polr output

I have a dependent variable that is technically ordinal, so I ran a ordered probit model (polr). However, an ordered probit model does not produce any residuals ...
7 views

I have two datasets, $X$ and $Y$. I calculate the PCA components of $X$ and also perform CCA on $X$ and $Y$. If I create a model with all the PCA components of $X$, and another model with all the CCA ...
6 views

The interpretation of a positive glm coefficient, with a negative marginal effect

I found this post titled: "Positive coefficient but negative marginal effect in mlogit". However I recently had the same "issue" with an ordinal probit model. Maarten Buis explains ...
8 views

Variable Importance Plot & Hypothesis Testing

I am trying to predict whether client would take up a promotion or not using the random forest model. From the variable importance plot output, it is shown that the number of days pass the day of ...
5 views

Inverse problem with error in model

An inverse problem in science is the process of calculating direct and indirect observations from the phenomenon through the mathematical model. Inverse problem consists of data (observation), ...
19 views

AUC estimated by leave-one-out cross validation (LOOCV); how to estimate confidence interval for it?

I use logistic regression with a set of predictors X and a binary dependent variable y. I use LOOCV to produce "out-of-sample" model predictions y^_i for each x_i, where the model is ...
4 views

Chosing data for cluster analysis in a patient database

I am planning to perform cluster analysis on a patient database with several different variables such as prescriptions, conditions, labs, etc. Reading similar works I conclude that not all authors ...
16 views

What does it mean to have only lag significance on certain multiples of 7

I have a dataset named covid and after creating an acf graph of it , it looks something like this Why is it that it is only showing lag significance on lags which are multiples of 7 only , dose it ...
11 views

How to combine stability selection and model selection with LASSO?

I was reading about stability selection applied to LASSO. My understanding is that stability selection (Meinshausen & Buhlman, 2010) helps in finding stable variables, with error control provided ...
11 views

Probability Density Estimation vs Function Approximation

I have a function $f: \mathbb{R} \to \mathbb{R}_+$ and I would like to estimate it. The data pairs $\{(x_i, f(x_i))\}$ arrive at different times $t$. I have two questions: In this case, since the ...
13 views

What is the difference between correlation and explained variance?

Is there any meaningful difference between these two statements? X is highly correlated with Y X explains a lot of the variation of Y
10 views

How to interpret interaction in logistic regression?

I have the following setup: Dichotomous DV: Purchase referral (yes vs. no) Dichotomous IV1: Purchase type (good vs. service) Dichotomous IV2: Customization (standard vs. customized) My hypothesis is ...
6 views

Why is the Marginal Likelihood Estimator proposed in VAE not based on importance sampling?

I'm interested in evaluating $p(x)$ using a variational autoencoder. I would expect the straightforward way to estimate the marginal likelihood to be based on importance sampling: \begin{align} p(x) &...
8 views

Is the following Bayesian GLM reasonable?

Let $Y\geq 0$ count dependent variable following a $Poisson$ distribution with parameter $\lambda$. Also, let $X_{1}\geq 0,...,X_{q}\geq 0$ counts treated as independent variables. I want to fit the ...
6 views

Testing difference intensity regions of multiple images - GAM?

I am trying to model the difference between the pixel values of two regions in a set of images. Each image is different and contains the pair of regions. My question is about how to take into account ...
4 views

how to remove an outlier from demand data in the process of forecasting [duplicate]

I have to forecast demand for company based on the past four years. I have data starting from 2017 to 2020 but in the data of 2020 the demand for the months april and may is 0 due to lockdown imposed ...
5 views

How to setup xreg variables in cross validation

I'm trying to setup xreg variables to my model but I do not have clear idea about how using cross validation: library(tsibble) library(lubridate) library(dplyr) library(fable) iniciativa <- tibble( ...
22 views

An efficient estimator can be biased?

Can someone explain to me whether an efficient estimator can be biased? What I've read so far seems to be always about efficiency being a property being alluded to unbiased estimators but I was ...
6 views

calculating selected contrasts with emmeans within treatment

I have a dataset that has data collected at 8 different timepoints and in 5 different treatment groups, and want to do multiple pairwise comparisons. However, I want to run comparisons only between ...
24 views

Why permuting a predictor gives a measure of the importance of the variable?

I am reading the vignette for the R package randomForestExplainer. This package allows us the compute the importance of variables in a random forest model. The result of the function ...
13 views

p value and number of predictors

I was going through the An Introduction to Statistical Learning: With Applications in R book and I am facing a bit of difficulty in understanding the below paragraph.I am including the paragraph ...
6 views

How to set initial values for the prior model in a mix mode from DepmixS4 package in R

I am trying to figure out how to add a concomitant variable in the mix model in DepmixS4 package in R. My model looks like below ...
17 views

Different Results for glmnet when standardize = FALSE

I asked this question at stackoverflow, but at this point I'm not exactly sure where it belongs because it is a question related to the standardization process of ...
6 views

Interaction effects in non-linear models with Mlogit

In the case of mlogit, the command margins, over(race father_occ) expression(exp(xb())) post How can we specify outcome(1) and calculate for each of the outcome categories; Or any other way to ...
7 views

Huber or bisquare or something else?

I am working on iterative weighting methods. There are many and I am wondering what method to use (I am curve fitting).
6 views

Create Fitness score/highscore with multiple variables

I am currently building a Neural network( + genetic algorithms) that learns to fly a 2D drone to a target. My goal is that it archives all tasks as fast a possible but I want the drone to also fly ...
5 views

How to deal with different vector dimensions when combining numerical categories and vectors generated from text (NLP)?

I have a dataset with categorical columns and one text column. As it is a Classification problem. I wanted to perform NLP based modelling on the text column and another ML model on the categorical ...
13 views

Showing the relationship between variables and drawing regression line

I am trying to solve a question which says: Use ggplot() to plot the graphs to see the relationship between variables GS with COA. I am writing it as: ...
18 views

Tweedie GLM, what var.power should I chose?

Im trying to do a GLM on my data about bats to see how different variables affect bat activity on 8 species. Orignally my data was count data, but because of hardware difficulties I had to divide the ...
5 views

How to deal with missing value in longitudinal data using inverse probability weight

I have the following longitudinal data with time-varying variables: "exposure" is a categorical variable with three levels "event" is a binary variable with 0 means no event occurs,...
18 views

Prove A unbiased estimate of variance in ANOVA

When i read the book 《Statistical Inference》. I could not solve a proof showed that $\frac{\sum_{i=1}^{k}n_i{(\overline{Y_i} - \overline{\overline{Y}})^2}}{k-1}$ is unbiased estimate of $σ{^2}$. I ...
6 views

Difference of plotting ellipse using R packages car and PlaneGeometry

I want to plot the ellipse $$4 x_{1}^{2}+3 x_{2}^{2}-2 \sqrt{2} x_{1} x_{2} =x^{\prime} A x = c^2$$ where $c^{2}=1$, $x=(x_1,x_2)^\prime$ and A=\left[\begin{array}{rr}4 & -\sqrt{2} \\ -\sqrt{2}...
7 views

Residuals vs Fitted Interpretation and Comparison

Hello these are both Residuals vs Fitted plots I have created for my models. The top is the plot for an old model, and the bottom is the plot for an improved new model. What is the difference between ...
10 views

With multiple imputed data, how do you probe a categorical-by-categorical interaction in logistic regression?

I am working with 10 multiple imputed datasets in SAS. I used the command PROC SURVEYLOGISTIC to fit a multivariate model with 6 predictors (3 dichotomous and 3 categorical) and their interaction ...
13 views

How to do feature Selection with multiple thousands of features both categorical and numerical for classification problem?

I have a data set that has a large number of features (~8k features) and I want to limit the number of features so my model does not overfit but performs relatively well. I have mix of categorical and ...
7 views

Can the encoder and decoder have different hidden dimensions in the Transformer architecture?

In the vanilla Transformer architecture, can we have an encoder with hidden size of 768, and a decoder with hidden size of 792?
82 views

How to account for shifting seasonality arising due to differences between gregorian and Islamic calendars?

I am trying to predict time series through decomposition, my time series is as follows, As islamic calendars lag the gregorian calendar by 10 days after each year, so my seasonality is also changing, ...
10 views

Residuals in Generalized Pareto Distribution

I'm learning generalized Pareto distribution for fitting extreme value data. I came across an R package evir that is able to plot residuals. Residuals from a GPD ...
23 views

Weighted least-squares when weights are not known

I have two questions while I am doing a weighted non-linear least-squares fit. I vaguely remember from some class that the weights should be 1/abs(residuals), or 1/(residuals^2). I am not sure what I ...
16 views

How to compare or prove statistical similarities between two models with differing independent and dependent variables?

I have two datasets: The relationship between Bitcoin prices and other cryptocurrencies The relationship between EUR prices and other currencies What would be the most appropriate way to prove ...
6 views

what do i do with the error “there are aliased coefficients in the model”

I was trying to test for multicollinearity using VIF. Here is my codes: ...
35 views

How do I estimate a Bayesian linear regression without assuming normal likelihood?

Frequentist linear regression makes no assumptions about the joint distribution beyond finite second moments. How can I perform similar agnostic Bayesian linear regression, without imposing additional ...