Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

Dredged many global models in R (binomial GLMs), how can I compare results across models?

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
  • 65
1 vote
0 answers
35 views

p-values based on clustered se with glm [migrated]

I would like to retrieve the p-values from glm with clustered standard errors. I have used a function to calculate the clustered standard errors and then use these to generate a summary of the model ...
Beni's user avatar
  • 13
0 votes
1 answer
30 views

How to get coefficients from glm model in python

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
8 views

Binary predictive classification in R, with predictors consisting of multiple values [migrated]

I am struggling currently with constructing a binary glm predictive classifier, due to an issue with dimensionality. I have a dataset of N samples where each sample has values for M entries (genes) ...
Sativus's user avatar
0 votes
0 answers
27 views

Understanding statistical significance

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
14 views

Poisson regression - using offset AND weights [migrated]

I have seen several posts on using offset VS using weights, however I cannot locate anything about using both of those features. The problem is as follows: I model the number of occurred events (k). ...
HansKloss's user avatar
0 votes
0 answers
25 views

How to select a reference level for categorical variables using Scikit-Learn?

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
7 views

Ridge penalization using glmsmurf from smurf package

Is there a way to apply ridge penalization using the glmsmurf function from the smurf R package?
user3516915's user avatar
0 votes
0 answers
20 views

I need help to debug my Zeroinfl GLM that causes an error indicating 'NA' and "exactly singular systems"

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
0 votes
1 answer
25 views

how can I quickly run multiple glm for different categories within my data?

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
49 views

Difference in estimates of SE between R's GLM and Python's minimize method

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,173
0 votes
0 answers
31 views

Predicted values in a Tweedie GLM-model

I need help with how to create an actual vs predicted plot for a Tweedie GLM model in R where weights are used. I have a Tweedie GLM model in R where I have derived the coefficients/factors for a risk ...
kabin's user avatar
  • 139
0 votes
0 answers
14 views

'sdm' function ensemble model warning messages ('rf', 'gam', 'mars')

I'm running into warning messages when I include several model methods into my 'sdmData' function. Here's the code: d <- sdmData(formula = sp~.,train=PO, predictors=env_raster, bg=background) #PO =...
Kate's user avatar
  • 1
0 votes
0 answers
32 views

Using GEE with "geepack" for survey data that includes time-fixed covariates

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
0 answers
21 views

Getting results output for random factors in glmer()

CONTEXT: Previously, my data fit a normal distribution and I was able to use a linear mixed effects model, lmer(), with the following format: lmer(predictor ~ response + (1 | random), data = data) I ...
Olivia Jones's user avatar
0 votes
0 answers
26 views

logistic regressions using statsmodel and pyspark result in different estimations

I have tested statsmodel and various pyspark ml packages for logistic regression with weightCol feature and found the model estimations vary. For my particular tests: statsmodel and pyspark.ml....
user16739's user avatar
  • 101
0 votes
0 answers
18 views

glm is returning random letters for levels of an ordered factor [duplicate]

I'm using the glm function to evaluate the effect of two variables on the response variable converted, which are: tibble [780 × 3] (S3: tbl_df/tbl/data.frame) $ converted : Factor w/ 2 levels &...
Théodore Targerian's user avatar
0 votes
1 answer
34 views

Recovering `init.theta` from `glm.nb()`

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
  • 495
0 votes
0 answers
26 views

AIC comes out of NA when conducting TSR [duplicate]

Does anyone have ideas why when running a TSR in R Iend up getting NA for AIC to checkmodel fit? my comands looks like this. model2 <- glm(cases ~ fourier + time,analysis_data,family=quasipoisson) ...
Mio's user avatar
  • 1
0 votes
1 answer
28 views

Issue with including a quadratic term into a GLM quasi-poisson

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
47 views

x@presence error for Species Distribution modeling [closed]

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
59 views

Error in using mlogit function: "replacement has 8 rows, data has 9"

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
31 views

EdgeR DGE Matrix: Help Understanding Comparison / Contrast

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
45 views

Zero-inflated negbin regression warnings after permutation of data

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
69 views

How to calculate and code confidence intervals for marginal predictions in GLM.jl/Effects.jl?

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
0 answers
50 views

How plot ROC curve in r from dismo model.evaluate package

I'm working with dismo package evaluating glm models to Species Distribution Models. I need to plot ROC curve. dismo package have a way to doit using plot(evaluation, "ROC") "...
Ricardo Soto's user avatar
0 votes
0 answers
21 views

Find best predictors using GAM and having separate deviance for each predictor

I need to determine the influence of soil properties (predictors) on soluble heavy metals (response variables) and quantify the proportion of deviance explained by each predictors. The dataset ...
MinKin's user avatar
  • 1
0 votes
1 answer
557 views

How can I solve this problem in ChatGLM-6b? AttributeError: 'ChatGLMTokenizer' object has no attribute 'sp_tokenizer'

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
0 votes
0 answers
105 views

What GLM family and link I should use for the left skewed dependent variable?

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
88 views

Fitting a logistic model with multiple dependent vars/LHS

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
0 answers
90 views

What assumptions need to be validated for a GLM/GMM with a Gamma distribution?

I want to determine the effect of different attributes (sex, age...) on the rate of nest building in birds. My response variable is continuous and strictly greater than 0. So I wanted to answer this ...
Clémence delmas's user avatar
0 votes
3 answers
61 views

Coefficients in each step of stepwise regression

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
0 votes
0 answers
78 views

How is it possible for a glm and an emmeans on the same model to get different results?

I'm running a model comparing percent abnormality across two factors, mate pair and treatment. I ran the code: model <- glm(Percent~Treatment+MatePair, data=sub_plut_abnorm) summary(model) enter ...
Sindhu Bala's user avatar
2 votes
1 answer
198 views

How to bootstrap glm regression, estimate 95% confidence interval and plot it?

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
  • 177
0 votes
0 answers
31 views

Visreg plot of glm object doesn't match glm values

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
  • 133
0 votes
0 answers
12 views

problems in making predictor matrix in r for mcglm model

I am doing mcglm model for retinopathy(factor, yes, no) and set of 450 proteins (x), age, sex, bmi as predictor. i am getting following error while making predictor matrix. Z1 <- mc_mixed(ret~x+bmi+...
champa's user avatar
  • 1
0 votes
0 answers
19 views

Python glm regression with log link, using aggregated success, failure data

I want to build a GLM data, but I have aggregated count data, instead of individual 0/1 data. I can do it in R, How to do it in Python? data <- data.frame(n = c(1000000, 20000000), x = c(2003, ...
Leo Q's user avatar
  • 1
0 votes
0 answers
17 views

How do I fix the response: Error in contrasts in R

I get an error response when a full simple logistic model is run in R. However this only occur when I include SHTCVD191_A (which is not the variable with the most missing values). Including the ...
Emmanuel Olaniyan's user avatar
-2 votes
1 answer
81 views

How can be the `$ operator is invalid for atomic vectors` error solved?

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
  • 203
1 vote
1 answer
97 views

Error when trying to fit glmer in R with Poisson distribution: PIRLS step-halvings failed to reduce deviance in pwrssUpdate

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
81 views

How to extract Correlation of Coefficients table from models like glm?

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
122 views

How to force lm() and glm() functions not to refactor weights for linear regression?

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
0 votes
0 answers
31 views

GLM-Small sample size

I have data of relative abundance (in percentage) of 5 categories of ingested items in the stomachs of 8 fish species collected from 4 rivers. The number of sampled fish stomachs collected from ...
Aston's user avatar
  • 3
0 votes
0 answers
59 views

F-test and chi-squared test for coefficient significance in sklearn generalized linear models

I have created a generalized linear model with sklearn with the following code X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.3) clf_hard = GammaRegressor(alpha = 0) clf_hard....
kremidzu's user avatar
1 vote
0 answers
67 views

GLM Error in R - Getting the message: "Error: no valid set of coefficients has been found: please supply starting values"

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
1 vote
0 answers
41 views

Building Species distribution modells for species within a raster stack

I have run a GLM Species Distribution Model for a single species, but I want to replicate this for a different species within a raster stack. I initially ran an SDM for one species and got an error ...
Stone Bee's user avatar
0 votes
0 answers
311 views

how do I fix this glmer error in r: PIRLS loop resulted in NaN value

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
0 votes
0 answers
40 views

Robust Poison regression

In glm, poisson regression, in the estimation tab there is a robust estimator option, is this the robust standard error estimator? To use instead of modified poisson, that spss doesn't have? A ...
Sveta's user avatar
  • 1
1 vote
2 answers
72 views

How are computed linear predictors in R glm probit?

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
0 answers
93 views

Creating Added Variable Plots for GLMM Averaged Models

I have an average model from the model.avg function from the MuMIn package. I created this model from a centered and scaled dataframe. First, I used the dataframe to create a glmm with a nested effect....
Jason Edelkind's user avatar

1
2 3 4 5
41