Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
89 views

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 ...
user31732487's user avatar
0 votes
1 answer
51 views

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 ...
Tom Anderer's user avatar
1 vote
0 answers
44 views

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 ...
Lara's user avatar
  • 11
1 vote
1 answer
171 views

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://...
Ariel's user avatar
  • 11
0 votes
1 answer
75 views

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 ...
Giovanni Tinervia's user avatar
4 votes
1 answer
74 views

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 ~ ...
Daniel Lobo's user avatar
1 vote
1 answer
100 views

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 ...
Alice's user avatar
  • 67
3 votes
2 answers
307 views

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 ...
Joshua Entrop's user avatar
0 votes
0 answers
111 views

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 ...
Klervi's user avatar
  • 7
11 votes
2 answers
410 views

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 ...
Spacedman's user avatar
  • 94.7k
0 votes
0 answers
23 views

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 ...
Fatima's user avatar
  • 1
0 votes
0 answers
77 views

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 ...
Ananya Mishra's user avatar
0 votes
0 answers
38 views

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. ...
Harry S.'s user avatar
0 votes
0 answers
28 views

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 ...
Hugo Counoy's user avatar
3 votes
2 answers
93 views

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(`...
Rover Eye's user avatar
  • 259
1 vote
0 answers
74 views

tl;dr: I bootstrapped a generalized linear model. I would like to see the confidence interval for each factor instead of the CIs of reference levels. I ran a generalized linear model. My dependent ...
bribina's user avatar
  • 89
0 votes
0 answers
48 views

I am conducting a randomisation inference procedure with ri2 for a binary model. I use glm and specify as a family binomial (link = 'logit'). When I use the ri2 on this model apparently it is not ...
Beni's user avatar
  • 11
1 vote
1 answer
407 views

I want to predict a fitted poisson glm on newdata, given that it was fitted using offset=log(Exposure), but I get confused with the inclusion of the term "offset" inside of predict.glm(). I ...
rmcm22's user avatar
  • 11
0 votes
1 answer
178 views

I'm conducting data exploration on lots of parameters (including multiple ways to summarize a parameter). I'm trying to prioritize variables for prediction onto test data. I'd like to use dredge to ...
Quinn's user avatar
  • 67
0 votes
1 answer
65 views

I have trained the following glm model in Python: fitGlm = smf.glm( listOfInModelFeatures, family=sm.families.Binomial(),data=train, freq_weights = train['model_weight']).fit() I have ...
Giampaolo Levorato's user avatar
0 votes
0 answers
43 views

I have 16 birds (191978,191984, 191977, 191980, 191986, 201446, 191983, 201447, 211598, 211590, 211595, 191981, 211591, 201441, 201445, 211592). There are 6 males and 10 females. The dataset is called ...
Zach Ng's user avatar
0 votes
0 answers
47 views

I'm trying to convert a code from SAS to Python which trains a GLM. For that, I'm using the hpgenselect with the CLASS word to deal with categorical variables. In SAS I can select the reference level ...
Felippe Trigueiro 's user avatar
0 votes
0 answers
29 views

I am having a problem with my code. I am trying to create a GLM model with Zeroinfl since my data set has many 0's in it. I am trying to study the influence of pond characteristics on pond amphibian ...
Gabriel Johnson's user avatar
-1 votes
1 answer
78 views

i have a df that contains data for the nation and would like to see if the relationship between variables is different at smaller geographies (region, state). i have tried using the subset argument of ...
Bethanie Stauffer's user avatar
0 votes
0 answers
52 views

I have below dataset in R dat = structure(list(PurchasedProb = c(0.37212389963679, 0.572853363351896, 0.908207789994776, 0.201681931037456, 0.898389684967697, 0.944675268605351, 0.660797792486846, 0....
Bogaso's user avatar
  • 3,896
0 votes
0 answers
137 views

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 (which are ...
Erb's user avatar
  • 13
0 votes
1 answer
77 views

glm.nb() automatically calculates an init.theta when it is not user specified. I cannot however seem to recover the user specified init.theta. When querying the model object, I obtain init.theta as 5....
jcken's user avatar
  • 505
0 votes
1 answer
53 views

I am currently looking at country-wide population ‘censuses’ that were conducted by feeding vultures at all restaurant sites simultaneously. Simultaneous census counts were conducted twice in June ...
Emeline AUDA's user avatar
0 votes
1 answer
97 views

Does anybody know how to solve this problem? I'm trying to build a species Distribution model using bioclimatic variables sdm package by Naimi, 2016 R version 4.4.1 ERROR: model <- sdm(Species ~ ., ...
Simon's user avatar
  • 1
1 vote
0 answers
74 views

I am trying to estimate a simple multinomial logit model. The utility of a product is given by: U_{ij}=\beta⋅price_{ij}​+fixed_effect_j​+ϵ_{ij}. I have data which contains the choices made by ...
user20380762's user avatar
1 vote
0 answers
97 views

I'm doing some differential expression analysis between two conditions (= Timepoint) and I'm including biological covariates in my design. I want to analyse further if differences between Timepoint ...
Elizabeth Mist's user avatar
1 vote
1 answer
66 views

I am applying a zeroinfl negbin regression to my data. Specifically, my dependent variable is a count variable (centrality measure), while my independent/controls are both binary and continous. I've ...
user23757853's user avatar
0 votes
1 answer
188 views

I am seeking assistance in how to calculate and write the code to produce 95% confidence intervals for the marginal predictions produced by Effects.jl for a fitted logistic regression model (e.g. ...
guysutton's user avatar
0 votes
1 answer
1k views

The default program from "https://github.com/THUDM/ChatGLM-6B" works out while I was running api.py. But recently when I try to run it again it suddenly errors:"AttributeError: '...
Tianrun Zhao's user avatar
1 vote
0 answers
314 views

From what I read, the Generalized Linear Model (GLM) is flexible in accommodating a variety of error distributions. To effectively utilize GLM, it is important to select an appropriate family and link ...
Acmad Abdullah's user avatar
2 votes
1 answer
273 views

Is there a way to do multivariate logistic regression using glm()? I have several binary outcomes and I know you can do this with linear regression (lm()) and cbind() but I can't seem to figure out ...
allen.joseph's user avatar
0 votes
3 answers
112 views

I am using a stepwise regression in R, with this code: model_scicareer_all <- glm(scicareer ~ ., family = binomial(link = "logit"), data = clean_data) summary(...
Juan Pedro Ross's user avatar
2 votes
1 answer
508 views

I am doing glm regression with a 0-1 distribution dataset. It's going well with ggplot2::geom_smooth; here is my code: library(ggplot2) set.seed(123) df <- transform(data.frame(Conc=runif(200, ...
Dylan Li's user avatar
  • 309
0 votes
0 answers
59 views

I have the following DATA And the following code that builds a binomial logistic regression model, wherein all variables are factors: #setwd("wherever you downloaded the file") data_ev <- ...
Wangana's user avatar
  • 233
-2 votes
1 answer
120 views

I'm trying to perform a CAPM regression analysis with a Bayesian GLM. I have developed the R code below but when I try to fit the model for the posterior predictive checks posterior_intercept <- ...
José's user avatar
  • 215
1 vote
1 answer
313 views

The models I'm running won't converge / show an error. Do you have any advice about working with non-normal focal data? Most of the data are zero inflated or highly skewed. The model I want to run is ...
Joel's user avatar
  • 31
1 vote
1 answer
291 views

After running a statistical model in R (e.g., glm, lm, lme4::lmer, etc.), I run the summary() command with corr=TRUE to get the Correlation of Coefficients table. It features a matrix of correlations ...
kneergaard's user avatar
-1 votes
1 answer
274 views

I just want to run lm() and glm() for linear regression without refactoring weights, i.e., to utilize the weights just as they are specified. How can I do that? It is known, but not documented, that ...
Viktor's user avatar
  • 472
1 vote
0 answers
110 views

I am trying to assign a poisson distribution to the random component of a GLM in R, however I keep getting the message "Error: no valid set of coefficients has been found: please supply starting ...
Antonio A's user avatar
0 votes
0 answers
773 views

I am trying to run a random effects generalized linear model specifying the family as binomial and a log link to estimate risk ratio (RR) and 95% confidence intervals (CIs). When I run it, I keep ...
John M's user avatar
  • 1
1 vote
2 answers
209 views

I would like to understand how linear.predictors are computed in the output of pb = glm(formula, family = binomial( link = "probit" ), data) From my understanding, it should be the product ...
hexolitemax's user avatar
0 votes
1 answer
90 views

I'm working from a project built by a previous programmer. The call to glm() the programmer has in their documentation is glm(formula = AVAL ~ AUC, family = binomial(), data = logreg.dat) I have the ...
BennyBoi's user avatar
1 vote
1 answer
377 views

I conducted a logistic regression and multiple comparison library(lme4) model < glmer(y ~ Genger + Age + subject + (1 | ParticipantID), data = data, family = binomial(link = "logit")) ...
catcat's user avatar
  • 13
0 votes
0 answers
46 views

I need to know the coefficient of every level of a glm. Call: glm(formula = Rep ~ ph_cat1, family = binomial(), data = db) Coefficients: (Intercept) ph_cat12 ph_cat13 3.296 -3....
ArTu's user avatar
  • 483
0 votes
0 answers
431 views

How do I estimate Poisson quasi maximum likelihood (MLE) models in python? Standard Poisson MLE assumes that the conditional mean of the variable equals its variance. Quasi-MLE permits relaxes this ...
Simon Firestone's user avatar

1
2 3 4 5
41