Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
0 replies
30 views

I’m building a regression model that predicts the final number of vehicles booked for a ferry trip. Each training row represents the state of bookings for a given trip N days before departure. Example ...
vpvinc's user avatar
  • 165
2 votes
0 answers
96 views

I have the following R code that performs a multinomial logistic regression. When scaling birthweight from grams (original data) to kg (more similar scale as other variables and easier interpretation) ...
Dorien's user avatar
  • 373
Advice
0 votes
2 replies
52 views

I have a dataset with around 10,000 continuous variables (gene abundances) in 200 samples, and also some parameters of these samples (e.g., pH). I am trying to see if there are any genes whose ...
ALG's user avatar
  • 322
Advice
0 votes
1 replies
87 views

How should I handle a mass-point in the dependent variable when running OLS regression in R? I’m working with a a household expenditure dataset (Living Costs 2019) where the dependent variable is the ...
Jimothan's user avatar
0 votes
0 answers
25 views

I am trying to generate an ARIMA process with statsmodels. I tried already different combinations but nothing works. There is also nothing in the documentation that could solve my problem. The ...
Hillbilly Joe's user avatar
0 votes
0 answers
82 views

I am trying to perform a Monte-Carlo simulation on quantile regression using R. Currently I am getting stuck simulating the data from the model below. Y=beta_0+beta_1*X1*u1+u2 where, u2~N(0,1),u1~exp(...
UNI39's user avatar
  • 29
Tooling
0 votes
5 replies
111 views

I want to use deming regression for the calculation of a linear function between two variables which both have measurement errors. In addition, I have to assume that the regression goes through the ...
user25269951's user avatar
0 votes
1 answer
84 views

I would like to conduct a F-test (Wilks' Lambda test, ideally) to test the equality of the slope coefficients for a single independent variable on two dependent variables. Using the mtcars dataset, ...
anoble's user avatar
  • 1
2 votes
1 answer
79 views

I would like to perform a Deming regression through the origin including a ratio of variance of 2.1 between the x and y variable, as the data I am working with includes measurement errors in the x and ...
user25269951's user avatar
0 votes
0 answers
40 views

I'm performing Gaussian process regression using GPyTorch. I'm modeling two correlated tasks as follows: class MyModel(gpytorch.models.ExactGP): def __init__(self, X, Y, likelihood): super(...
SirAndy3000's user avatar
2 votes
0 answers
102 views

I'm potentially interested in performing ODR for some laboratory data, so I have started to play around with scipy.odr using fake data, just for the sake of learning. In this fake data example, ...
nukamoi's user avatar
  • 21
1 vote
1 answer
67 views

I have a dataset with a binary outcome income and two continuous predictors, age, and education_num. I'm fitting a logistic regression model with a natural spline for age and an interaction with ...
Konstantinos Gkirgkiris's user avatar
0 votes
0 answers
58 views

I've implemented standard homoskedastic multitask Gaussian process regression using GPyTorch as follows: class MyModel(gpytorch.models.ExactGP): def __init__(self, X, Y, likelihood): super(...
SirAndy3000's user avatar
2 votes
1 answer
209 views

I am analyzing competing risks data in R and want to confirm that I’m setting up both Fine-Gray and cause-specific Cox regression correctly. My dataset encodes the event status as: status = 1: ...
Konstantinos Gkirgkiris's user avatar
-2 votes
5 answers
174 views

When you estimate a model, the estimation function will drop observations (i.e., rows) for which at least one variable (i.e., column) used either in the LHS or in the RHS of the formula is missing. ...
robertspierre's user avatar
0 votes
0 answers
65 views

I encounter error: Application terminated with error: ??+0 (0x709D9F003D8A) ??+0 (0x709D9E884BA4) ??+0 (0x709D9E9F388C) ??+0 (0x709D9FF2FCF5) ??+0 (0x709D9FF31448) ??+0 (0x709D9EB84E21) ??+0 (...
Mr.kitty's user avatar
2 votes
0 answers
49 views

I'm following this to get proportional odds regression for a likert scale but I'm getting this error when I try to use predict: Error in X %*% object$coefficients : non-conformable arguments This is ...
dsaizt's user avatar
  • 21
0 votes
1 answer
89 views

Sample Code library(quantreg) df <- data.frame( outcome = c(10, 12, 14, 11, 13, 15, 9, 8, 10), group = factor(c("A", "A", "A", "B", "B", "...
JJCC's user avatar
  • 3
2 votes
1 answer
135 views

I've used sklearn for polynomial ridge regression. Using grid search, I am happy with the results. Now I would like to render it as a simple polynomial equation to run in a small python module. The ...
MikeB2019x's user avatar
  • 1,309
0 votes
0 answers
35 views

am performing regression analysis using the fitnet function to develop a supervised neural network that acts as a surrogate model. The training target data have specific constraints: all outputs must ...
shiyu shukla's user avatar
2 votes
1 answer
68 views

I am trying to build a scikit-learn compatible estimator. I have built a custom class that inherits from BaseEstimator and RegressorMixin. However, when I try to use this, I run into an AttributeError:...
Álvaro Méndez Civieta's user avatar
0 votes
1 answer
101 views

I want to simulate a Discrete-Choice/Multinomial model. Consider the situation where I have 100 people each with four choices (1 = air, 2 = bus, 3 = car, 4 = train). There is a baseline preference ...
kpr62's user avatar
  • 575
0 votes
0 answers
78 views

I'm analyzing a dataset on student performance from this site called "student-mat.csv", and I'm working on an ordinal logistic regression model. I want to use the vglm() function from the ...
robotnoises's user avatar
0 votes
0 answers
56 views

I'm trying to fit a multivariate ordinal probit model using the mvord package in R. I have two ordered outcome variables (transit.commute.freq.pre.agg and transit.commute.freq.agg), each with a ...
It's lighthouse's user avatar
2 votes
1 answer
105 views

I created two models using the lm() function in R. The first model, I created the design matrix for my prediction variable and then fed that into the lm() function. copy <- data.frame(mtcars) ...
Arthur's user avatar
  • 21
3 votes
0 answers
80 views

I have some real data points, and I'm trying to use the ODR to fit linear regression and also output the uncertainty error of the slope. import numpy as np from scipy.odr import ODR, Model, RealData ...
Mom Mam's user avatar
  • 151
4 votes
0 answers
133 views

I have a project of a symbolic regression (here on GitHub). I use first curve_fit of scipy to find parameters with linear expressions (see fit function line 85 of file sr.py) but for non linear ...
P'tit Ju's user avatar
  • 143
3 votes
1 answer
55 views

Thanks in advance for any help you can provide. I have a dataset containing some healthcare data and am trying my hand at using python for EDA/regression modeling on the set. I have one date column [...
Kevin O'Leary's user avatar
-1 votes
1 answer
62 views

I'd like to make a plot like in R But, I have no idea how to do it. Can some of you help me? The plot shows the coefficients and Confidence intervals for several regressions and each specification ...
Andres Rengifo's user avatar
2 votes
0 answers
306 views

I am trying to use the did_multiplegt_dyn package to estimate 2 different DiD models, one in which treatment is absorbing and one in which it is non-absorbing. That is, subjects may switch in and out ...
flâneur's user avatar
  • 341
0 votes
0 answers
30 views

I try to figure out if a two-way fixed effect model (TWFE) implies parallel trend assumption--which further implies that difference in difference generalizes TWFE. However, I find some problems. I ...
Fangzhi Luo's user avatar
1 vote
1 answer
116 views

I need to make a multivariate polynomial regression. The code is based on https://saturncloud.io/blog/multivariate-polynomial-regression-with-python/. So for my specific task I need to "kill"...
Lukas Burmeister's user avatar
2 votes
1 answer
41 views

I am trying to calculate the probability that being from university 1 affects edge formation in an ERGM. However, I can't seem to change the reference category from 1 to something else. D1 <- ...
Amy's user avatar
  • 21
2 votes
1 answer
102 views

I am running some regression tables with stargazer. Is there any way I could save them directly as JPGs or any other image format. Here is some sample code: library(stargazer) data(mtcars) model1 <...
YouLocalRUser's user avatar
0 votes
0 answers
27 views

I'm making a logistic regression model to predict female presence on boards in tech SMEs. I was going to take out companies with only 1 employee, as they don't have boards, but my supervisor told me ...
Anya's user avatar
  • 1
1 vote
1 answer
124 views

So I'm replicating a paper, most probably done on Stata judging by the appearance of the graphs. However I'm using R, and while the numbers are exactly the same when it comes to variable construction, ...
Val's user avatar
  • 99
1 vote
1 answer
97 views

I use keras and tensorflow to train a 'simple' Multilayer Perceptron (MLP) for a regression task, where I use the mean-squared error (MSE) as loss-function. I denote my training data as x_train, ...
Red's user avatar
  • 123
1 vote
1 answer
79 views

could someone please help me to fix the following error : [AttributeError: 'super' object has no attribute 'sklearn_tags'] based on my code : from tensorflow import keras from scikeras.wrappers ...
Arnauld's user avatar
  • 11
1 vote
0 answers
43 views

In the R package rms, the pentrace() function enables penalized maximum likelihood estimation on a regression model that was initially fitted using unpenalized methods. The function needs a grid of ...
user167591's user avatar
0 votes
0 answers
20 views

I have the following dataset: X1 X2 X3 y 0 0.548814 0.715189 0.602763 0.264556 1 0.544883 0.423655 0.645894 0.774234 2 0.437587 0.891773 0.963663 0.456150 3 ...
quant's user avatar
  • 4,512
6 votes
1 answer
82 views

I'm looking to build out a multiple regression in Python and need to numerically encode my categorical data. I have fields such as gender (Male, Female, Prefer not to Say), education level (High ...
learning to code's user avatar
0 votes
2 answers
108 views

Consider a regression task where the parameters of the model differ significantly in magnitude, say: def func(x, p): p1, p2, p3 = p return np.sin(p1*x) * np.exp(p2*x) * p3 # True Parameters: ...
TsurumiTei's user avatar
0 votes
0 answers
53 views

I am running an event study design and get some unexpected behavior using OLS. One of my outcome variables is by definition zero before the treatment, i.e., whenever event time is weakly smaller than ...
Simon's user avatar
  • 35
0 votes
0 answers
27 views

I am trying to fit a multiple regression model to my data. I am testing the hypothesis that outcome Y is linearly related to independent variable X, while controlling for a linear relationship with ...
user29991160's user avatar
2 votes
1 answer
191 views

Suppose I have data x = (x_1,...,x_n). I would like to create a basis matrix in R whose (i,j)th entry is B_j(x_i) - B_j(0), where B_j(.) is the jth cubic B-spline basis function. Is this possible to ...
User505's user avatar
  • 23
3 votes
1 answer
68 views

I am just wondering how I can show the result that takes into account the interaction between certain independent variables. I learned that if interaction is significant or interaction is considered ...
Stats_Beginner's user avatar
0 votes
0 answers
53 views

Can stepwise selection method be used in COX Mixed model with R? lmerTest and cAIC4 packages both don't work. In addition, is LASSO a better process to select predictors for regression models, ...
Ting Zhang's user avatar
0 votes
1 answer
97 views

I am trying to emulate an nls() fit with nls2() via brute-force, when nls() works, so that I can look to a second option when it doesn't. What am I doing wrong in how I have specified nls2() below? Is ...
LucaS's user avatar
  • 1,335
0 votes
2 answers
136 views

I have various pump performance data, and I am trying to fit curves as a combination of them. In below image, different curves are at different pump speeds (RPM), and the Y axis is Pressure head, and ...
Jesh Kundem's user avatar
  • 1,003
1 vote
3 answers
185 views

I'm using the emmeans package with a negative-binomial model implemented using the glmmTMB package. I'm trying to bias adjust my backtransformed emmeans per the workflow illustrated here: https://cran....
myfatson's user avatar
  • 561

1
2 3 4 5
189