2,008 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
92
views
Multinomial Regression and non-functioning predicts()-function
I have to do some work in R for university and I'm stuck. When I use the predicts() function from the glm.predict package, I keep getting an error message that I don't understand. Codes that I get ...
0
votes
1
answer
51
views
Can I flip the axes in a sjPlot::plot_model(type = "est") plot?
I have a logistic regression model. The outcome is whether individuals voted for a certain party at time t. We have filtered the data so that only observations remain which have voted for this party ...
1
vote
0
answers
44
views
How to use glmulti in R when some variables have to be in all considered formulas?
I want to use glmulti to find the best model, but I want some variables (vb, vv) to be in all candidate models included. I have tried to extand the example from the R documentation with a factor vv ...
1
vote
1
answer
171
views
Error "could not find function 'dposnegbin2'" when using posnegbinomial() in vglm() from VGAM
I'm trying to fit a zero-truncated negative binomial model using the vglm() function from the VGAM package in R. However, I'm encountering the following error:
> dat <- read.dta("https://...
0
votes
1
answer
76
views
Issue with home-made forest plot in R ggplot2
I'm creating a forest plot for my logistic regression model in R. I am not happy with the forest plot created by some packages, especially because the names of the predictors and the levels of the ...
4
votes
1
answer
75
views
Calculation of Accuracy ratio for Logistic regression
I have fitted a Logistic Regression using a dummy data as below,
set.seed(1)
binary <- sample(c(1,0), 9, replace = T)
outcome <- rnorm(9)
treatment <- rnorm(9)
glm_fit <- glm(binary ~ ...
1
vote
1
answer
103
views
AME with Survey weights
I'm trying to calculate average marginal effects (AMEs) from a logistic regression model estimated with svyglm from the survey package.
I am using the design from a specialised package developed to ...
3
votes
2
answers
307
views
Non standard evaluation in formula argument
Problem
I would like to fit multiple logistic regression models in R for different values of i:
glm(mpg_20 ~ poly(horsepower, i), data = Auto)
My problem is that the call argument of the resulting ...
0
votes
0
answers
113
views
problem with glmmTMB with a matern for spatial autocorrelation
I have a dataset of bird counts, on a spatial grid, with environmental and prey data.
I have applied a correction factor for distance from observers, so I have semi-continuous values, with lots of 0's ...
11
votes
2
answers
410
views
Extracting model coefficients for formula terms
If I fit an lm or glm with factors as explanatory variables, I get a model with estimates and SEs for each level of the factor (minus the baseline level). How can I reliably extract that info for ...
0
votes
0
answers
23
views
Error in Y %*% Q01 : non-conformable arguments using Zicoseq in GUnifrac?
I'm trying to use Zicoseq on my data set and run into these non-conformable arguments. I've made sure that my originating matrices have the equal amount of rows (16), and that the columns look the ...
0
votes
0
answers
77
views
clustered standard errors in R clogit
I am using the clogit command in R, however I am not able to cluster the standard errors by districts using the method = "exact". It works with method = "error" but it gives me ...
0
votes
0
answers
38
views
Get continuous predictor values from a probit glmer() model in R?
I am running a binomial probit model in R. Condition is a categorical variable with value Target as the treatment group (index is 10). pPrime is continuous between 0 and 1. TC_c is continuous. ...
0
votes
0
answers
29
views
Model selection : how to deal with fixed and random effects in the same time?
I am studying the effect of various ecological variables on different plant species. I want to use GLM(M), but I am not very familiar with this approach.
After a preliminary correlation analysis and ...
3
votes
2
answers
93
views
Variable names and Easystats reports
I am trying to fit a very simple logistic regression model on a data, and then try and get an easystats text report:
library(tidyverse)
library(easystats)
Data <- structure(list(`...