Questions tagged [logits]

40 questions
2
votes
0 answers

Can I specify a random intercept in a conditional logit model?

In conditional logit models, global intercepts cannot be estimated as they do not influence the conditional probability of a positive outcome within groups. I understand the intercept term gets cancelled out in the derivation of the equation, just…
Olifa
  • 21
  • 3
2
votes
4 answers

How can I improve the format of regression tables?

I've used R to run some logit regressions - testing the characteristics of investment firms and whether or not any predict sustainable behaviours. In my paper I've copied acorss the output from R, however, I've had feedback saying I should try to…
R Wd
  • 59
  • 5
2
votes
0 answers

Compute and graph predicted values for all possible levels and values from a FE logit model’s predictors

I'm waiting for the bife (binary fixed effects) package to be supported in ggeffects but in the meantime I'd 1st) like to figure out how I can replicate what ggeffects does, and (very 2nd) like to understand whether I should be using the Average…
ibm
  • 744
  • 7
  • 14
2
votes
1 answer

Change in predicted logit in logistic regression with splines depending on other values of the same variable in the data frame

I've run the following model: log <- svyglm(compo ~ bs(edadc,degree=1, knots =c(-1,8)) + numenf5 + BMIc + BMIc2 + fried, dclus,family = quasibinomial) When I try to calculate logits for edadc=0, I get different results when I write: newdata2…
Ángel
  • 89
  • 6
2
votes
1 answer

glmmLasso error "requires numeric/complex matrix/vector arguments"

I am trying to learn the mechanics of the glmmLasso package for lasso estimation with a logistic link function with fixed effects but I cannot get a dummy example to work without error. library(glmmLasso) y=rbinom(n = 21,size = 1,prob =…
Noah Hammarlund
  • 103
  • 1
  • 10
1
vote
0 answers

How to Conduct and Analyze Time Series Ordinal Logistic Regression using R?

As I did not get any answer on CrossValidated, I will try my luck here. I am working on a project where I have collected ordinal outcome data at three different time points. I am interested in modeling the change over time with these ordinal…
Karl A
  • 165
  • 11
1
vote
0 answers

How to implement Haldane-Anscombe correction when calculating unadjusted odds ratios in R

I am trying to calculate a series of unadjusted odds ratios for my dataframe in R. Some of the crosstables contain zero cell sizes, and from what I've read I believe using the Haldane-Anscombe correction to add 0.5 to all cell sizes in those tables…
Shannon
  • 93
  • 8
1
vote
0 answers

Why doesn't tensorflow use `from_logits` automatically where needed?

According to Andrew Ng, when using tensorflow for classification it's better to use from_logits. I.e. instead of: model = Sequential([ ..., Dense(units=1, activation='sigmoid') ]) model.compile(..., BinaryCrossentropy()) the advice is to…
Tiddo
  • 6,331
  • 6
  • 52
  • 85
1
vote
0 answers

most efficient way of using categorical independent variables in a JAGS bayesian model

I am trying to run a logistic regression model in JAGS, with a binomial response (rather than Bernoulli process) and wish to model month as a categorical variable. I can easily model month as a continuous model: # Priors beta0 ~ dunif(-20,…
Mark
  • 37
  • 1
  • 8
1
vote
1 answer

How to calculate marginal effects of logit model with fixed effects by using a sample of more than 50 million observations

I have a sample of more than 50 million observations. I estimate the following model in R: model1 <- feglm(rejection~ variable1+ variable1^2 + variable2+ variable3+ variable4 | city_fixed_effects + year_fixed_effects,…
1
vote
0 answers

Visualizing APEs (aka AME) from the bife package

How do I get this 'summary.bifeAPEs' list str data into a dataframe so I can plot the effects? I can't seem to coerce it into a dataframe using the recommendations from list data examples in SO. library(bife) test <- iris%>% mutate(LengthDummy=…
ibm
  • 744
  • 7
  • 14
1
vote
1 answer

How does the BERT model select the label ordering?

I'm training BertForSequenceClassification for a classification task. My dataset consists of 'contains adverse effect' (1) and 'does not contain adverse effect' (0). The dataset contains all of the 1s and then the 0s after (the data isn't shuffled).…
1
vote
0 answers

Unexpected behaviour of from_logits in BinaryCrossentropy?

I am playing with a naive U-net that I'm deploying on MNIST as a toy dataset. I am seeing a strange behaviour in the way the from_logits argument works in tf.keras.losses.BinaryCrossentropy. From what I understand, if in the last layer of any neural…
1
vote
1 answer

ValueError: logits and labels must have the same shape ((None, 4) vs (None, 1))

I try to make a convolutional neural network in order to classify dogs and cat. I got error mentioned in the title. From my search, some said that error belongs to different versions of tensorflow and keras libraries, others said that it is a syntax…
Andrei
  • 73
  • 1
  • 13
1
vote
1 answer

Fixed effect logit:adjusted r square-bife package in R

I”m working on my fixed effect logit model using bife package in R. But the problem is I need the adjusted r square, currently I only can calculate normal r square using the package result. Does this package have any function to do that?
1
2 3