1
$\begingroup$

My task is to run a logistic regression that models the probability that revenue is non-zero (in the logistic regression parlance, a positive revenue is a success). Revenue variable is numeric and expressed in thousands of euro. My code looks like this:

my_data <- dataset
my_data$success <- ifelse(my_data$revenue > 0, 1, 0)
logistic_model <- glm(success ~ age + initial_capital + industry,
     data = my_data, family = "binomial")
summary(logistic_model)

Is it correct or there should be revenue variable itself when estimating the equation?

I want to know if the equation is correct, because it gives different values when I type either revenue or success in the equation

$\endgroup$
3
  • 1
    $\begingroup$ I agree that it’s primarily a methods question but since it is specifically about R, CV.com might refuse. The answer(I think) is the code looks fine and the a difference is to be expected. Go with the “success” as the dependent variable. $\endgroup$
    – DWin
    Commented May 27, 2023 at 16:25
  • 1
    $\begingroup$ I thought it was more a conceptual question about whether revenue should be used as a predictor or not (I agree that it shouldn't ... it would be circular to have revenue as a predictor and "revenue equal to zero" as a response) $\endgroup$
    – Ben Bolker
    Commented May 27, 2023 at 16:48
  • $\begingroup$ Due to the nature of a startup, many ventures in the sample have not yet started selling products or services; therefore, their revenue is zero. That's the part of the task for estimating the regression $\endgroup$
    – Sally Nelly
    Commented May 27, 2023 at 17:03

2 Answers 2

1
$\begingroup$

Is it correct or there should be revenue variable itself when estimating the equation?

By this, I'm assuming you mean including the numeric value as a predictor. Something like

logistic_model <- glm(success ~ age + initial_capital + industry, data = my_data, family = "binomial")

Clearly, were you to do this then the successes and failures would be completely separable and hence your model would fail to fit.

$\endgroup$
2
  • $\begingroup$ Can you explain it more clearly? I don’t understand a word from what u texted after my code $\endgroup$ Commented May 28, 2023 at 11:23
  • $\begingroup$ @SallyNelly if you include revenye in the model, your model will not work due to this en.wikipedia.org/wiki/Separation_(statistics) $\endgroup$ Commented May 28, 2023 at 17:58
1
$\begingroup$

I have my doubts that you should model revenue in this kind of binary way. However, if that if what you want to do, then the revenue value cannot be a predictor variable. When it comes time to make predictions in the future, you will lack the revenue value and be unable to make a prediction.

$\endgroup$
5
  • $\begingroup$ Due to the nature of a startup, many ventures in the sample have not yet started selling products or services; therefore, their revenue is zero. That's the part of the task for estimating the regression $\endgroup$ Commented May 28, 2023 at 6:57
  • $\begingroup$ @SallyNelly Does that oppose something I wrote? $\endgroup$
    – Dave
    Commented May 28, 2023 at 7:39
  • $\begingroup$ Well, I didn’t understand your answer at all $\endgroup$ Commented May 28, 2023 at 8:06
  • $\begingroup$ In what kind should I model the revenue variable then? If it takes values from 0 to 1 since this is the logistic regression $\endgroup$ Commented May 28, 2023 at 8:07
  • $\begingroup$ If you use revenue as a predictor, what happens when you go to make new predictions? $\endgroup$
    – Dave
    Commented May 28, 2023 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.