Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
16 views

Regression with a 0-1 variable. Should be the same as running a t-test, but I get a different p-value [migrated]

I have a dataset in R where I have volatility estimates (in my case, just standard deviation of minute returns on that day) for different days: Date, Volatility, DayType The variable DayType is 0 or ...
Avocado's user avatar
  • 86
0 votes
0 answers
41 views

Problem with dynamic linear model -> lagged variable explains 100% of my model [closed]

I created a regression model, which regresses a cycle component onto a lagged cycle component and various other variables. It looks like this: regoffice4 <- dynlm( diff(diff(officecycle,1),1) ~ ...
Alexander Holzinger's user avatar
0 votes
0 answers
28 views

PISA 2022 data R Support

for my dissertation I am using the PISA 2022 dataset. I am using RStudio for this purpose. I am not good at R (I am a humanities student who did a conversion data science degree, which I regret as I ...
bja521's user avatar
  • 11
1 vote
1 answer
39 views

Need help using "reframe" to run multivariate regression across multiple data sets (changing model from one year to multiple years)

I have a simple multivariate regression model testing the impact of two variables on another over one year (1971). I have a large data set that includes these data over a number of years and am being ...
jonathanl86's user avatar
0 votes
0 answers
15 views

How to perform model comparison based on multinom( ) function of nnet package in R? [migrated]

My independent variables are gender and sequence, and the dependent variable is intervention (including 3 intervention methods). I established a multinomial logistic regression model to examine the ...
zhang xia's user avatar
0 votes
1 answer
32 views

NA values when using avg_predictions() from marginaleffects with a flexsurv model

I'm unsure why I do not get standard errors or confidence intervals when I fit parametric survival models and compute the predicted mean survival times using the avg_predictions(). I tried using ...
Tony's user avatar
  • 15
0 votes
0 answers
20 views

How do I correctly specify nesting in the sommer R package?

I accustomed to lme4 where it would be simply: (1|genotype/root_ID) but it's unclear to me looking through the documentation the appropriate way to do this in sommer. mod1 <- mmer(Y ~ 1, ...
bigoof99's user avatar
0 votes
2 answers
45 views

Export latex table from summary of rddensity function in R

I am interested in exporting the summary of the rddensity function in latex in R. I've tried to use modelsummary without sucess, and capturing output also hasn't worked out. My objective is to export ...
John M. Riveros's user avatar
1 vote
1 answer
38 views

Error when ploting the original date with the predictions of the best models using curve()

I'm trying to plot the original date with the predictions of the best models using curve() because I'm working with polynomial models, but I keep getting this error: Error in curve(predict(best_models\...
Andreia Raposo's user avatar
0 votes
0 answers
30 views

Correlation alternatives / How to go about testing this relationship? [migrated]

I have a large set of temperature data from upstream and downstream gauges. I am trying to find the influence of dam release on downstream temperatures. To do this, I am comparing correlation between ...
Matt Schaaf's user avatar
1 vote
0 answers
39 views

Similar regression table with modelsummary as fixest with etable()

With fixest one can use etable() to produce regression tables of the form library(fixest) library(modelsummary) data("trade") lm1 <- feols(log(Euros) ~ log(dist_km), trade) lm2 <- ...
98198128's user avatar
3 votes
0 answers
89 views

How can I specify and visualize an interaction in a rms cph model without the main effects included, i.e. with column?

I have a time-to-event model (cph or coxph) with an interaction of a binary and a continuous variable. It works with a *, but it does not work with :. Why is that? library("survival") ...
Brigitte's user avatar
  • 821
0 votes
1 answer
45 views

Regression Line help in ggplot2

I am trying to add a regression line into my ggplot. Below is the code I am using to make the plot. I am wanting to plot the regression line in the first plot (L5andDownTempAvgPlot) but keep running ...
Matt Schaaf's user avatar
1 vote
1 answer
201 views

"Error in initializePtr(): function 'cholmod_factor_ldetA' not provided by package Matrix" gets displayed while trying to generate mixed effects model

I have already tried the previous solutions displayed by some users. I have tried removing and reinstalling Matrix and lme4 packages. To make matters worse, now R is unable to install lme4 or Matrix ...
Ramanpreet Kaur's user avatar
1 vote
1 answer
51 views

Error in lm.fit(x,y,offset = offset, singular.ok,...) for exponential lm() model in R

I am trying to apply a exponential regression on the given data frame : df <- structure(list(Type_stat = c("Vitesse_min", "Vitesse_max", "Vitesse_min", "...
C. Guff's user avatar
  • 468

15 30 50 per page
1
2 3 4 5
318