9,411 questions
Advice
0
votes
0
replies
19
views
How to force rms::redun to treat spline interaction terms as a single chunk?
I am performing a redundancy analysis using rms::redun() in R. My model includes an interaction between a binary treatment variable and a restricted cubic spline of a continuous variable: treatment * ...
Advice
0
votes
0
replies
30
views
Time-based regression: is it leakage if training includes snapshots closer to the event than those used at prediction?
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 ...
2
votes
0
answers
96
views
multinom standard errors change when scaling variable
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) ...
Advice
0
votes
2
replies
52
views
Detect non-linear regression patterns in multiple univariate analyses
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 ...
Advice
0
votes
1
replies
88
views
Regression analysis
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 ...
0
votes
0
answers
25
views
How to generate a simple ARIMA process with statsmodels
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 ...
Tooling
0
votes
5
replies
112
views
Deming Regression R - Prediction/Confidence Interval and use of total least squares
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 ...
0
votes
1
answer
84
views
Testing equality of multivariate coefficients with linearHypothesis()
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, ...
2
votes
1
answer
81
views
Deming Regression in R, Error Message if CV=TRUE
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 ...
0
votes
0
answers
40
views
How do I interpret Gaussian process parameters?
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(...
2
votes
0
answers
102
views
scipy.odr.ODR fails when y_err (sy) is provided - "Problem is not full rank at solution"
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, ...
1
vote
1
answer
67
views
Combining lines in a predicted probability plot without changing the regression model
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 ...
0
votes
0
answers
58
views
How do I create a multitask GPyTorch model with a user-specified noise covariance matrix?
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(...
2
votes
1
answer
217
views
Fine-Gray vs Cause-Specific Cox Regression: Correct Code for sHR and csHR in R
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: ...
-2
votes
5
answers
174
views
Get dataframe of observations dropped in estimates
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.
...