Skip to main content

All Questions

Tagged with
1 vote
0 answers
29 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
11 views

GEE Modelling with 'geepack' showing contrast errors [duplicate]

I want to use Generalized Estimating Equations (GEE) to model longitudinal survey data. Participants' responses were recorded at three timepoints, and I have multiple independent variables that I ...
Erb's user avatar
  • 13
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
31 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
43 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
38 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
178 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
0 votes
0 answers
23 views

Interacting Instrumental Variables Using fixest Package

In the following example, I regress y on and x1 and x2 and instrument for x1 using z1. I'd like to add another term, the interaction between x1 and x2, but I'm unsure how. Can someone point me in the ...
Ryan Longmuir's user avatar
0 votes
0 answers
51 views

Getting the dispersion parameter from a negative binomial regression in python

R code to find the dispersion parameter of the negative binomial regression model. mod.Syn.L.plusGamma <- glm.nb(Syn ~ offset(I(1*log(L))), data = Lang.data) r = mod.Syn.L.plusGamma$theta The ...
JasonFred Ngwa's user avatar

15 30 50 per page
1
2 3 4 5
318