category stringclasses 107
values | title stringlengths 15 179 | question_link stringlengths 59 147 | question_body stringlengths 53 33.8k | answer_html stringlengths 0 28.8k | __index_level_0__ int64 0 1.58k |
|---|---|---|---|---|---|
logistic regression | Getting $>1$ responses in logistic regression? | https://stats.stackexchange.com/questions/241159/getting-1-responses-in-logistic-regression | <p>Is it normal to get values for response that are $> 1$ even though in logistic regression the response has meaning only in the range $[0,1]$?</p>
<p>Does one then have to truncate all $> 1$ values to mean just $1.0$?</p>
<hr>
<p>The reason for asking is that</p>
<p>I got something that looked like it might... | <p>You are not getting probabilities because you are confusing the order of operation between adding the coefficients and taking the inverse logit.</p>
<p>Explanation:
You have a logistic model given by
<span class="math-container">$$logit(Pr(cancer=1|trt,skin,\beta)) = \beta_0 + \beta_1 * trt + \beta_2 * skin$$</span... | 100 |
logistic regression | Why is independence of observations an assumption in logistic regression | https://stats.stackexchange.com/questions/488362/why-is-independence-of-observations-an-assumption-in-logistic-regression | <p>I am currently learning about the assumptions of logistic regression and am having a hard time wrapping my head around <em>why</em> independence of observations is necessary for this test. Any guidance would be appreciated.</p>
| 101 | |
logistic regression | Logistic regression and different Independent variable classes - what to do? | https://stats.stackexchange.com/questions/235467/logistic-regression-and-different-independent-variable-classes-what-to-do | <p>I'm trying to run a logistic regression in R to determine what independent variables may determine if a sea turtle becomes entangled in fishing net or not. My independent variables vary significantly from each other in both scale and class e.g. Mesh size (7mm-1500mm), Twine diameter(0.33-4mm) Colour (red,blue green... | 102 | |
logistic regression | Help with interpreting coefficients in logistic regression | https://stats.stackexchange.com/questions/235640/help-with-interpreting-coefficients-in-logistic-regression | <p>I am running some logistic regressions in R. I need some help with interpreting coefficients. </p>
<p>So, if my DV is 1 = yes and 0 = no, and I have five groups (a, b, c, d, e) and I make a the reference group (dummy coding), and the coefficient for b is significant and positive:</p>
<ul>
<li>does this mean the od... | <p>Denote the coefficient for $b$ by $\beta$ and the model's intercept by $\alpha$. We let group $a$ be the reference level. </p>
<p>Logistic regression fits the model:</p>
<p>$logit(\pi(x)) = \alpha + \beta_1 x_1 + ... + \beta_p x_p$</p>
<p>Where $logit(\pi(x)) = log(\frac{\pi(x)}{1-\pi(x)}) = log(odds(\pi(x)))$</p... | 103 |
logistic regression | Is Logistic Regression the right analyses when a study has 1 categorical DV and 2 categorical IV's? | https://stats.stackexchange.com/questions/237355/is-logistic-regression-the-right-analyses-when-a-study-has-1-categorical-dv-and | <p>I am working on a project for a faculty member who wants to know if placement in Developmental Reading (IV1: Dev RDG & NonDev RDG) and/or placement in Developmental English (IV2: Dev ENG & NonDev ENG) affects the success rate (DV: Successful & Unsuccessful) in a course (HIS101 for example).</p>
<p>I use... | <p>Your dependent variable is categorical so yes Logistic Regression is most likely appropriate here. Your independent variables are all categorical but you can still apply a logistic regression. </p>
<p>Your model looks something like this </p>
<p>$log(\frac{p}{1-p})= \beta_0 + \beta_1X_1 + \beta_2X_2$</p>
<p>where... | 104 |
logistic regression | Normalization of 'change variables' in logistic regression | https://stats.stackexchange.com/questions/237559/normalization-of-change-variables-in-logistic-regression | <p>I am running a logit model trying to predict purchases on a dataset including change variables, i.e. I have a dataset of this kind:</p>
<pre><code> webvisits.month1 webvisits.month2 webvisits.month3 Purchase
contract1 34 21 22 0
contract2 11 ... | <p>What you need to improve your model is not normalisation, but create extra features which could affect the target. e.g. captured the change across months in independent variables: webvisits.month2-webvisits.month1 or average, max of 3 months. capture the increasing and decreasing trend. Again just webvisits might no... | 105 |
logistic regression | How to model a logistic regression with head to head data? | https://stats.stackexchange.com/questions/253515/how-to-model-a-logistic-regression-with-head-to-head-data | <p><strong>Preface</strong></p>
<p>I've looked at
<a href="https://stats.stackexchange.com/questions/11800/how-should-we-convert-sports-results-data-to-perform-a-valid-logistical-regressi">How should we convert sports results data to perform a valid logistical regression?</a> and <a href="https://stats.stackexchange.c... | <p>I can suggest to you 3 ideas:</p>
<ul>
<li>From your input data, you can create a new training set with only one feature: the age of the team. It almost the same idea that you suggest in your question. Your training set will look like:</li>
</ul>
<blockquote>
<pre><code>age outcome
72 1
75 1
78 ... | 106 |
logistic regression | 1-1 Mapping in Logistic Regression | https://stats.stackexchange.com/questions/255969/1-1-mapping-in-logistic-regression | <p>I have a variable $Y$=Control=$C$ and three variables:</p>
<ul>
<li>Fraud := $F$</li>
<li>Error := $E$</li>
<li>Waste := $W$</li>
</ul>
<p>all numerical variables. I am studying the effect of control methods on each of $F,E,W$, as well as on the combination of the three. </p>
<p>To study the three efficiently var... | 107 | |
logistic regression | Question about Logistic Regression - Formula | https://stats.stackexchange.com/questions/258271/question-about-logistic-regression-formula | <p>could someone help me.
<a href="http://sites.stat.psu.edu/~jiali/course/stat597e/notes2/logit.pdf" rel="nofollow noreferrer">http://sites.stat.psu.edu/~jiali/course/stat597e/notes2/logit.pdf</a> (page 4)
What exactly are $\beta_{10}$ and $\beta_{20}$. How are they defined? </p>
<p>I don't understand this, it's st... | <p>That is a multinomial logit model. The outcome has $K$ categories, one of which is the reference, so you are modeling $K-1$ odds. $\beta_{10}$ is the constant for the first odds, $\beta_{20}$ is the constant for the second odds, etc.</p>
| 108 |
logistic regression | How to perform a power analysis for the following binomial Glmm? | https://stats.stackexchange.com/questions/263315/how-to-perform-a-power-analysis-for-the-following-binomial-glmm | <p>H0: There is no effect of treatment (Road vs control) on rat occupancy<br>
H1: Road has an effect on rat occupancy</p>
<pre><code>Mod1 <- glmer(Rat.Present ~ Treatment * Set.distance + (1|Site/Trap.Night), data = df.sub1,
family = binomial)
summary(Mod1)
Generalized linear mixed model fit by maximu... | 109 | |
logistic regression | how to interpret beta in logistic regression | https://stats.stackexchange.com/questions/263583/how-to-interpret-beta-in-logistic-regression | <p>I conducted binary logistic regression analysis (DV is measured in yes, no). Among my IVs, One IV is about partnership measured in dichotomous (yes, no) and another IV is population density and measured as (Low=1, average =2, high (reference group) =3).</p>
<p>The output shows that:</p>
<ul>
<li>For partnership: $... | 110 | |
logistic regression | binary logistic regression p values problem | https://stats.stackexchange.com/questions/200822/binary-logistic-regression-p-values-problem | <p>i made different models . in first I took a dependent variable and four independent variables .
in second model I took different dependent variable and similar independent variable
like wise I made four models
but when I ran binary logistic regression I found similar p values in all models despite of different dep... | <p>"Similar" p values can certainly happen, especially if the dependent variables are related to each other. </p>
<p>However, without seeing your code it's not possible to say for sure what you did or whether it was a mistake. </p>
<p>E.g. suppose one DV was "Voted for McCain" and another was "Voted for Romney" and ... | 111 |
logistic regression | Binomial GLM vs. Bernoulli GLM | https://stats.stackexchange.com/questions/200840/binomial-glm-vs-bernoulli-glm | <p>I have some data that- in its raw form - represents group binomial data.Y vector is the probability of an event. Using logistic regression I get one set of parameter coefficients. </p>
<p>Turning the data into a longer form - Bernoulli format (i.e. Y vector is 1 or 0), I use logistic regression again and get a diff... | 112 | |
logistic regression | Can I run a regression when both independent and dependent variables are all dichotomous? | https://stats.stackexchange.com/questions/215490/can-i-run-a-regression-when-both-independent-and-dependent-variables-are-all-dic | <p>I have conducted a survey where all my questions are asked in a dichotomous manner (Yes/No).</p>
<p>Eg IV:"Are you a smoker?", "Are you obese", "Is your gender male/Female" etc. DV: "Have you ever had a stroke?"</p>
<p>Therefore both my dependent variable and independent variables are all dichotomous(Binary= measu... | <p>In this case, you are relating binary properties of a person (answers to questions) to binary outcome (stroke/no stroke). A good place to start is to formulate this as a <a href="https://en.wikipedia.org/wiki/Logistic_regression" rel="nofollow">logistic regression</a> problem, since it will constrain your dependent ... | 113 |
logistic regression | Approaching a regression problem with many independent variables and binary response variable with very small success rate | https://stats.stackexchange.com/questions/223368/approaching-a-regression-problem-with-many-independent-variables-and-binary-resp | <p>One of my friends was asked in the interview following question:</p>
<p>There are 35000 independent variables and 7 million observation over those variables. There is a binary response variable. There is a success rate of 1%.
What will be your approach here?</p>
| 114 | |
logistic regression | Why does the inclusion of an intercept in my logistic regression cause my $R^2$ to decrease dramatically | https://stats.stackexchange.com/questions/149074/why-does-the-inclusion-of-an-intercept-in-my-logistic-regression-cause-my-r2 | <p>I am running a logistic regression in order to determine the error rate of an outcome given some covariates. Two of my covariates are indicator flags for the location. When I include an intercept, one of the location flags is dropped which I understand. What I do not understand is that my $R^2$ also drops from ar... | <p>Keep in mind there is no real $R^2$ for logistic regression. There may be a variety of pseudo-$R^2$s, but their mileage can vary.</p>
<p>For your first model, the baseline model for the pseudo-$R^2$ is logit=0, i.e., prob $Y_i=1$ is 0.5. For nearly any data, this is an awful model, so no wonder than adding anything... | 115 |
logistic regression | logistic regression when data consists of shared and non-shared variables | https://stats.stackexchange.com/questions/149510/logistic-regression-when-data-consists-of-shared-and-non-shared-variables | <hr>
<p>Could someone point me toward a specific method to model data that consists of two groups of observations having the same dependent variable and sharing some explanatory variables, BUT also having explanatory variables that are defined for one group and not for another?
A situation like this:</p>
<hr>
<ul>
<... | 116 | |
logistic regression | Logistic regression cost function intuition | https://stats.stackexchange.com/questions/156284/logistic-regression-cost-function-intuition | <p>My question is regarding the LR cost function from andrews ML course (<a href="http://feature-space.com/en/document50.pdf" rel="nofollow noreferrer">http://feature-space.com/en/document50.pdf</a> , page -5)</p>
<p>$cost= \frac{1}{m}[ -y \times \log(\psi) - (1-y) \times \log(\kappa) ]$</p>
<p>The vector y holds val... | <p>$y$ always takes on values of 1 or 0, as you noted. For the multi-class problem, you're going to solve for the "one vs. all" case. You'll need to transform your $y$ vector into a vector of 1's and 0's depending on the class you are minimizing for. So for the number 5, you'll solve for $P(y=5)$ vs. $P(y \ne 5)$. You ... | 117 |
logistic regression | Proportion Predictive Model with Bi-modal distribution | https://stats.stackexchange.com/questions/161038/proportion-predictive-model-with-bi-modal-distribution | <p>I am building a model that predicts a proportion: $y_i \sim f(x_{1,i}, x_{2,i},.., x_{n,i})$, where $y_i \in [0,1]$.</p>
<p>One thing I find is that 40% of the observations have $y_i=0$. For the remaining 60%, if I plot $logit^{-1}(y_i)$, it looks like a nice bell curve. </p>
<p>My question here is if I should rea... | 118 | |
logistic regression | General question on the analysis design | https://stats.stackexchange.com/questions/168037/general-question-on-the-analysis-design | <p>I have the following problem.</p>
<p>Three hospitals of similar structure have the very different mortality rate on one certain disease. I would like to analyse the data, whether the location as a factor has an influence on the mortality after adjusting for age, gender, urgencies etc.</p>
<p>My plan is to try logi... | <p>I think that could make sense - if I understand what you'd want to do, you'd have an indicator for whether or not the person passed away, and that would be the target of your model. If the hospitals are of similar structure (similar services, resources, etc.) then you could just include a dummy indicator in the regr... | 119 |
logistic regression | Gradient Scores from Binary Logistic Regression | https://stats.stackexchange.com/questions/169522/gradient-scores-from-binary-logistic-regression | <p>My research concerns the language of Alzheimer's patients. As the disease progresses, their language becomes more concrete and less abstract - they seem to 'lose' their abstract vocabulary more quickly. Tracking that change over the course of the disease might have clinical benefits. </p>
<p>I have identified a num... | <p>It doesn't seem fundamentally flawed to me. For this to work, you need</p>
<ol>
<li>A training set of nouns that are coded "abstract" or "concrete".</li>
<li>A BLR model that relates concreteness to your independent variables.</li>
<li>Test this model on a test set of nouns whose concreteness you know.</li>
</ol>
... | 120 |
logistic regression | Stepwise Logistic regression - drop variables / transform variables | https://stats.stackexchange.com/questions/172572/stepwise-logistic-regression-drop-variables-transform-variables | <p>I have two questions I hope you could help me with.</p>
<p>I am doing a stepwise logistic regression.</p>
<ol>
<li>I have a variable that includes information other variables include already. For example "price_missing" ($1$ means price missing) and "price" ($0$ means price). Would it be a normal process to drop t... | <p>Agreed with @gung on the stepwise LR. Here is my personal thought:</p>
<ol>
<li><p>Difficult to answer based on the information you provided. From the statistical point of view, you may consider <a href="https://stats.stackexchange.com/search?q=collinearity%20">the collinearity problem</a>. But In the building pha... | 121 |
logistic regression | Logistical regression - very few 1's in response vector "Y" | https://stats.stackexchange.com/questions/175684/logistical-regression-very-few-1s-in-response-vector-y | <p>I am trying to develop a model for prediction of retention. The problem is that the retention is very rare - aprox. 0.2 %. So far I have been using logistical regression. Without much success however. For example, in the interval of predicted probability above 70 % I am getting 4 true retention clients and 157 wrong... | <p>You have a quite high lift in the scored data. So your predictions are not necessarily "bad". What are classification statistics (e.q AUC) in the test data set? </p>
| 122 |
logistic regression | Regression variable has no meaning for one category | https://stats.stackexchange.com/questions/176190/regression-variable-has-no-meaning-for-one-category | <p>For a (binary) logistic regression, I have two IV's in my model.
The first IV has three categories (one person, two persons, three or more persons).
The second variable is binary (communication exists vs. not exists)
For the first category, the second IV has no meaning, but for the second and third category is does.... | <p><strong>This will happen naturally, with no intervention on your part.</strong></p>
<p>Consider, for instance, <a href="http://www.ats.ucla.edu/stat/mult_pkg/faq/general/dummy.htm">dummy coding</a>. This system uses vectors of zeros and ones to indicate the categorical variables in a way that allows straightforwar... | 123 |
logistic regression | Maximum number of independent variables in Logistic Regression | https://stats.stackexchange.com/questions/79366/maximum-number-of-independent-variables-in-logistic-regression | <p>Is there a measure in logistic regression that maybe penalizes you for having too many independent variables like in multiple regression with the adjusted R squared?</p>
<p>That is, does having too many independent variables in a logistic regression hurt the model?</p>
<p>What about dummy variables? Can you have t... | <p>For the typical low signal:noise ratio we see in most problems, a common rule of thumb is that you need about 15 times as many events and 15 times as many non-events as there are parameters that you entertain putting into the model. The rationale for that "rule" is that it results in a model performance metric that... | 124 |
logistic regression | Why is Logistic Regression mentioned by many sources as useful in predicting stock prices? | https://stats.stackexchange.com/questions/178757/why-is-logistic-regression-mentioned-by-many-sources-as-useful-in-predicting-sto | <p>My understanding of Logistic Regression is that it is actually a classifier, hence used for predicting either a categorical outcome (ie. binary or an outcome with specific labels) as opposed to a continuous outcome.
I would have expected that predicting a stock price would be a continuous outcome, so I don't underst... | <p>Instead of predicting how much the stock gains or loses, the models are predicting the <strong>sign</strong> of the gain or loss, i.e. a binary outcome.</p>
| 125 |
logistic regression | Distribution in logistic regression | https://stats.stackexchange.com/questions/64603/distribution-in-logistic-regression | <p>Suppose we have $n$ observations. For example, consider $n$ people who each have their blood pressure ($x_1$), pulse ($x_2$), and blood glucose ($x_3$) levels measured. So there are are $3$ explanatory variables measured for each person. The outcome variable is presence or absence of obesity ($Y$). In this case, doe... | <p>Yes: the model is <span class="math-container">$\operatorname{logit} p_i = \beta_0 +\beta_1 x_{1i} + \beta_2 x_{2i} + \beta_3 x_{3i}$</span>.</p>
<p>That's true for bog-standard logistic regression anyway - the term is sometimes used where there's an extra parameter for dispersion, or for an estimating equation app... | 126 |
logistic regression | Advantages of breaking down a logistic regression in multiple steps? | https://stats.stackexchange.com/questions/289309/advantages-of-breaking-down-a-logistic-regression-in-multiple-steps | <p>I am wondering what are the advantages/disadvantages of breaking down a logistic regression in multiple steps, when they are available.</p>
<p>Let me explain what I mean by <em>multiple steps</em>: Think of it like the customer journey: A cold lead (<code>A</code>) becomes a prospect (<code>B</code>) who then becom... | <p>That sounds like a sequential logit to me. You can compute a "total" effect of explanatory variables on the finale outcome and decompose that into a weighted sum of the effect of that explanatory variable on each step/transition. See: <a href="http://dx.doi.org/10.1177/0049124115591014" rel="nofollow noreferrer">htt... | 127 |
logistic regression | Conditional logistic regression for calculation odds ratios | https://stats.stackexchange.com/questions/384808/conditional-logistic-regression-for-calculation-odds-ratios | <p>I want to calculate the crude and adjusted odds ratios for exposure to occupational risk factors such as aluminum and fossil fuels in my case control study. My cases are 180 demented patients and I have 370 controls. Which type of logistic regression model should I use? When I adjust for age and education the odds r... | <p>The type of model you should use depends on the way the dependent variable (DV) is measured. It appears that your DV is dichotomous (demented/controls) which would indicate "regular" logistic regression.</p>
<p>It is not necessarily wrong that the odds ratios (ORs) increase when you control for demographics. The ch... | 128 |
logistic regression | Is binary logistic regression the right choice? | https://stats.stackexchange.com/questions/67094/is-binary-logistic-regression-the-right-choice | <p>Apologies for the rudimentary question. I'm taking on a project at work that's a bit out of my wheelhouse and I want to bounce my ideas off of those more experienced than myself.</p>
<p>We use Salesforce.com at the software company where I work, and I want to identify which lead behaviors (whitepaper downloads, dem... | <p>If the outcome variable $Y$ is truly all-or-nothing, like falling off a cliff, then binary logistic model is likely to be appropriate. But stepwise variable selection is an invalid method.</p>
| 129 |
logistic regression | Assessing role of a count variable in regression... Do you need a zero? | https://stats.stackexchange.com/questions/70511/assessing-role-of-a-count-variable-in-regression-do-you-need-a-zero | <p>Is it acceptable to run a logistic regression on a yes/no DV and include a predictor variable that is a count of the number of times something happened previously, but none of the cases has a zero count? It seems to me you would be testing if more than 1 event matters, but not whether the overall number matters comp... | <p>This should be fine; I am not sure I understand why you think what you say in your last sentence. If no one has no events, then you can't say anything about people with no events, but that doesn't invalidate the rest of the model. </p>
| 130 |
logistic regression | Why does preponderance of a single outcome render binary logistic regression ineffective? | https://stats.stackexchange.com/questions/94060/why-does-preponderance-of-a-single-outcome-render-binary-logistic-regression-ine | <p>This question was motivated, but is separate from, the question I posted here:
<a href="https://stats.stackexchange.com/questions/94026/how-can-i-improve-the-predictive-power-of-this-logistic-regression-model">How can I improve the predictive power of this logistic regression model?</a>.</p>
<p>In that case the 'c... | <p>There's an excellent answer to this exact question <a href="http://www.statisticalhorizons.com/logistic-regression-for-rare-events" rel="nofollow noreferrer">here</a>, based on King & Zeng (2001) (<a href="http://gking.harvard.edu/files/gking/files/0s.pdf" rel="nofollow noreferrer">pdf</a>).</p>
<p>The gist, fr... | 131 |
logistic regression | Suitable regression model for limited, discrete dependent variable | https://stats.stackexchange.com/questions/97593/suitable-regression-model-for-limited-discrete-dependent-variable | <p>I have data where the dependent variable is discrete and lies between 20 and 40 (possible values are 20, 20.5, 21, 21.5, ..., 39, 39.5, 40). The variable measures some results from a game which can be between 20 (lowest achievable value) and 40 (highest).
After some hours of research on the web, I could not find a ... | <p>As long as the range of achieved scores isn't too narrow, you might treat your variable as effectively continuous, but with bounds. The bounds will impact linearity (a relationship can't just blast through a bound, so it must have a curve or bend) and constant variance assumptions (as the mean approaches a bound mor... | 132 |
logistic regression | Logistic regression for self-regulation | https://stats.stackexchange.com/questions/100191/logistic-regression-for-self-regulation | <p>My dataset contains samples of the following variables: <br></p>
<ul>
<li>$X_0$: the state of the system at time 0 (a continuous scalar)<br></li>
<li>$X_1$: the state of the system at time 1 (a continuous scalar)<br></li>
<li>$Y$: some binary variable describing the system at time 1 <br></li>
<li>$\boldsymbol{C}$:... | 133 | |
logistic regression | Modeling conditionally independent observations using logistic regressions | https://stats.stackexchange.com/questions/100916/modeling-conditionally-independent-observations-using-logistic-regressions | <p>I'm interested in modeling the probability of successfully arriving at a spawning site for an individual $i$, given two impediments that are conditioned on one another. I know whether an individual made it pass hurdle 1 ($y_{1,i}$) and hurdle 2 ($y_{2,i}$), and several other measurements that I want to use to model... | 134 | |
logistic regression | In regard binary logistic regression, which method is better: enter or one of the forward or backward elimination methods? | https://stats.stackexchange.com/questions/114151/in-regard-binary-logistic-regression-which-method-is-better-enter-or-one-of-th | <p>I am analysing a set of data where I try to predict an outcome (Level of women’s nutrition knowledge; whether it is High or Low) by using certain covariates (demographic characteristics of the sample). I have already done Chi-square analysis and now I am progressing to binary logistic regression.</p>
<p>To avoid an... | <p>You have engaged in dichotomania. Categorizing age, education, knowledge, and other continuous or ordinal variables will result in a host of problems. What is the rawest form of your variables?</p>
<p>Neither forwards selection nor backward elimination work as advertised, and you did not provide any motivation fo... | 135 |
logistic regression | Is monotonic sigmoidal relation between p and X'B in logistic regression equivalent as logit[p] having linear relation with X'B? | https://stats.stackexchange.com/questions/127348/is-monotonic-sigmoidal-relation-between-p-and-xb-in-logistic-regression-equival | <p>Is the requirement of monotonic sigmoidal relation between p and X'B in logistic regression equivalent as logit[p] having linear relation with X'B? X is the vector of independent variables and B is a vector of estimates.</p>
| 136 | |
logistic regression | using enter method to deal with variables in logistic regression? | https://stats.stackexchange.com/questions/129909/using-enter-method-to-deal-with-variables-in-logistic-regression | <p>I am working on data for logistic regression
I used enter method to deal with variables
Is it enough or i have to use forward and backward?
Is there any references or reports supporting using enter method alone?</p>
| <p>You certainly should <em>not</em> use forward and backward. Using the enter method alone is enough if you have strong hypotheses about which variables belong in the model. Some will say that you should drop variables that are not significant but I disagree. </p>
<ol>
<li><p>If you have a strong hypothesis that a va... | 137 |
logistic regression | Logistic regression : non exclusive predictors | https://stats.stackexchange.com/questions/135301/logistic-regression-non-exclusive-predictors | <p>I am doing a logistic regression . My outcome is a categorical (yes/ no) pain after surgery. The predictors i wish to model for includes the type of anaesthesia , among other predictors. The problem is the types i wish to include are general anaesthetic, plain spinal anaesthetic, spinal anaesthetic with morphine and... | <p>One option is to make the categories:</p>
<p>General anesthetic</p>
<ol>
<li>Spinal anesthetic with neither morphine nor diamorphine</li>
<li>SA with morphine only</li>
<li>SA with diamorphine only</li>
<li>SA with both</li>
</ol>
<p>Then they are mutually exclusive. </p>
| 138 |
logistic regression | Can we simply compare the predicted percentages of the outcome between studies? | https://stats.stackexchange.com/questions/34990/can-we-simply-compare-the-predicted-percentages-of-the-outcome-between-studies | <p>I used the multinomial logistic regression to predict the percentages of students who voted 'acceptable', 'uncertain', and 'unacceptable' to natural ventilation use in three observed classrooms during cool and hot seasons. </p>
<p>The sets of significant IVs of the cool and hot season cases were different; for e... | 139 | |
logistic regression | Logistic regression for abiotic influences on behavior | https://stats.stackexchange.com/questions/45491/logistic-regression-for-abiotic-influences-on-behavior | <p>What I am looking to do is test for a correlation between an activity (in this case nesting) with cumulative rainfall from the previous two weeks. For example, say one individual nested on DayX where the total rainfall from the previous 2 weeks is 4cm and another individual nested on DayY with 8cm of prior rain, and... | <p>I think you want either A) a survival analysis with time-varying covariates. The dependent variable is then "time to nesting" and the covariate is "amount of rain" or B) a survival analysis where the dependent variable is "rainfall to nesting". Which one would depend on whether time also is of interest (I'm guessing... | 140 |
logistic regression | Variable entered in logistic regression model is part of another variable entered in the same model | https://stats.stackexchange.com/questions/47314/variable-entered-in-logistic-regression-model-is-part-of-another-variable-entere | <p>I´m trying to find variables predicting a disease by using first logistic regression for each variable on the disease and then entering the significant variables into a multiple logistic regression model. However, one of the variables in the multivariate model is a clinical score, which contains some of the variable... | <p>Two comments:</p>
<p>First, I would explore other methods of variable selection. Looking at a set of unadjusted regressions and choosing the "significant" variables to then include in a final model is not an ideal approach. Your options are plentiful - search around here for topics on model selection to get you sta... | 141 |
logistic regression | How can I implement logistic regression in live decision system? | https://stats.stackexchange.com/questions/48054/how-can-i-implement-logistic-regression-in-live-decision-system | <p>I got the equation for logistic reg, and I am comfortable with the result. Let's say logit(p), ln(p/q), or the model is something like<br>
$$\text{logit}(p) = b+a_1X_1 + a_2X_2 + a_3X_3$$
For example --> <code>$b = 10 , a_1 = 0.5 , a_2 = 0.6 , a_3 =0.7$</code></p>
<p>So my equation is <code>$\text{logit(p)} = 10... | <p>Here is how I would approach it:</p>
<p>Do the logistic regression in R, make the data into an R object, The estimated regression is then an object, and prediction can be done using it via the <code>predict()</code> function. Put this data object and regression model object into an R package. Then the developer ... | 142 |
logistic regression | What is an acceptable proportion of events in logistic regression? | https://stats.stackexchange.com/questions/49931/what-is-an-acceptable-proportion-of-events-in-logistic-regression | <p>In market research I'm building a logistic regression model to estimate the likelihood that clients may change banks. The proportion of events is roughly 10% in my sample.
From university I remember that a proportion of events that is too small introduces bias into the estimate. Or is it the standard error that gets... | <p>The proportion of events is not the issue. It's the overall sample size and the number of explanatory variables. A smaller proportion requires a larger sample size. And more parameters (explanatory variables) means that you need a bigger sample size. When comparing two proportions, you would want each sample to be s... | 143 |
logistic regression | Convergence of batch gradient descent in logistic regression | https://stats.stackexchange.com/questions/55992/convergence-of-batch-gradient-descent-in-logistic-regression | <p>I am not really sure about how it behaves when using batch gradient descent in logistic regression.</p>
<p>As we do each iteration, $L(W)$ is getting bigger and bigger, it will jump across the largest point and $L(W)$ is going down. How do I know it without computing $L(W)$ but only knowing old $w$ vector and updat... | <p>Regularization is designed to combat overfitting, but not aid in gradient descent convergence.</p>
<p>If you are minimizing a function $J$ parameterized by vector $\theta$ and where each element of $\theta$ is identified by $\theta_j$, (i.e. minimize $J(\theta)$).</p>
<p>Then the basic idea in batch gradient desce... | 144 |
logistic regression | Calculating trend for 3 dimensional data | https://stats.stackexchange.com/questions/56325/calculating-trend-for-3-dimensional-data | <p>Forgive me for a potential dupe, as I don't know the correct terminology for searching for an existing question. Also please add tag "trends" or similar, as I don't have the reputation to create new tags.</p>
<p>I have market data like so:</p>
<pre><code>X Y S
10 20 0
20 30 1
20 25 0
15 10 0
...
</code></pre>
<... | <p>The standard approach would be to form a logistic regression expression. The log-odds of S=1 is modeled as a regression function of X and Y. Since Excel is pretty much never the right answer for anything, you should pick different modeling software, R being a free, complete, and accurate alternative to Excel.</p>
<... | 145 |
logistic regression | Fit a logistic regression code in R | https://stats.stackexchange.com/questions/56559/fit-a-logistic-regression-code-in-r | <p>If I have 10 Variables (Q,W,E,R,T,Y,U,I,P,A) and I want Q to be my response variable and other 9 to be my predictors variable. Do I write it in R like this </p>
<p><code>EXAMPLE<-glm(Q~W+E+R+T+Y+U+I+P+A,family=binomial)</code></p>
<p>Furthermore, what if Q is Binary (goes from 1 to 0) and all the other 9 vari... | <p>If those are the only variables in the data frame (I presume you have then ten variables in a data frame? If not do it!), and that data frame is named <code>foo</code>, then the following is a simpler way to specify the model:</p>
<pre><code>mod <- glm(Q ~ ., data = foo, family = binomial)
</code></pre>
<p>The ... | 146 |
logistic regression | Logistic regression: controlling variables not significant, what should I conclude/further test? | https://stats.stackexchange.com/questions/59107/logistic-regression-controlling-variables-not-significant-what-should-i-conclu | <p>I ran annual logisitic regression on time-series datas. The most important independant variable have coefficient that are significant in a lot of years, that's a relief. But the "controlling variables", have non-significant coefficients. I'm far from an expert in stats.</p>
<p>My sample is very small compared to th... | <p>There are reasons to include control variables even if they are not significant. E.g.</p>
<p>1) Including them may affect the parameter on the main independent variable (to my mind, this is the true meaning of a "control" variable).</p>
<p>2) Finding a small effect may be important, if others have found a large on... | 147 |
logistic regression | Statistical Analysis on mostly boolean values | https://stats.stackexchange.com/questions/63006/statistical-analysis-on-mostly-boolean-values | <p>So I have a large dataset, and I was wondering what the best way to conduct statistical analysis of it is. I'm very green in terms of statistical methods, but I learn quickly. Basically, each item has a couple attributes, and each attribute has several possibilities. Each item has their specific attribute set-up in ... | <p>If you are trying to predict downtime from attributes of messages, it sounds like you want some form of regression.</p>
<p>If downtime is a binary variable (yes/no) then you probably want logistic regression.</p>
<p>If downtime is continuous (e.g. in minutes or seconds) you probably want "regular" (ordinary least ... | 148 |
logistic regression | Counterpart to regression equivariance in logistic regression? | https://stats.stackexchange.com/questions/63195/counterpart-to-regression-equivariance-in-logistic-regression | <p>Let $T(y_i,\pmb x_i)$ be a regression estimator (of the scalar $y_i$ unto
the $p$-vector $\pmb x_i$). When $T$ is the usual LS estimator and $\nu\in\mathbb{R}^p$, we have that:</p>
<p>$$T(y_i+\pmb x_i'\pmb\nu,\pmb x_i)=T(y_i,\pmb x_i)+\pmb\nu$$</p>
<p>This property is called regression equivariance and plays much... | <blockquote>
<p>In linear regression there exist two other types of equivariance: one about adding a linear function to the response (‘regression equivariance’) and one about multiplying the response by a constant factor (‘y-scale equivariance’), but these obviously do not apply to logistic regression.</p>
</blockquo... | 149 |
logistic regression | Estimate probabilities of independent events given constraints | https://stats.stackexchange.com/questions/543993/estimate-probabilities-of-independent-events-given-constraints | <p>Suppose we have a dataset with various variables <span class="math-container">$\{X_1, X_2, ...\}$</span> with unknown distributions, and a binary response variable <span class="math-container">$K$</span> that is a direct function of one of the <span class="math-container">$X_i$</span>'s. Let us say an indicator func... | 150 | |
logistic regression | Regression with small target variable interval | https://stats.stackexchange.com/questions/425541/regression-with-small-target-variable-interval | <p>I am trying to train a Gradient Boosting on a '%-target variable', i.e. having values in the interval [0,1]. The bad thing about this particular case is that the target variable is very narrowly distributed around the value 0.99. It is not constant, there are different values, it is just that they all lie very close... | <p>In case other people may be interested: I think I figured out how to deal with such a situation.</p>
<p><strong>The way it worked for me:</strong>
Just use a translation (i.e. add a constant value <span class="math-container">$c=(0.5-\text{mean of target variable})$</span> to the target column) instead of a rescali... | 151 |
logistic regression | Is the null model for binary logistic regression just the natural log function? | https://stats.stackexchange.com/questions/82940/is-the-null-model-for-binary-logistic-regression-just-the-natural-log-function | <p>I am currently self-studying statistics and I'm confused about the null model in binary logistic regression. I understand that the null model is used to be compared with the model you designed, but what exactly is the null model? Just ln(x)=y?</p>
| <p>The full model is
$$\ln \frac {\pi}{1-\pi}=\beta_0 +\beta_1 x_1 +\beta_2 x_2+\ldots$$
where $x_i$ is the $i$<sup>th</sup> predictor, $\beta_i$ its coefficient, & $$\pi=\Pr(Y=1)$$
where $Y$ is the response (coded 1 for "success" & 0 for "failure")</p>
<p>The null model, as @Michael says, contains just the ... | 152 |
logistic regression | Understanding binary logistic regression as a linear model | https://stats.stackexchange.com/questions/556135/understanding-binary-logistic-regression-as-a-linear-model | <p>I understand that binary logistic regression is applied to binary classification problems where the dependent variable <span class="math-container">$Y$</span> has only two possible outcomes. The independent variables are <span class="math-container">$x$</span>. The result of logistic regression is assigning a probab... | <p>This is the logistic regression model, where the log-odds are posited to change as a linear function of some predictors.</p>
<p><span class="math-container">$$
\log\bigg(
\dfrac{p}{1-p}
\bigg) = X\beta
$$</span></p>
<p><span class="math-container">$X\beta$</span> is the linear combination. You denote it as <span cla... | 153 |
logistic regression | Help Interpreting Coefficients to Logistic Regression | https://stats.stackexchange.com/questions/559610/help-interpreting-coefficients-to-logistic-regression | <p>I am reading through the book <em>Practical Statistics for Data Scientists</em> and I am on a section covering logistic regression. In this section the book covers how the coefficients to the logistic regression function are on the log-odds scale. As an example, there is some R output that specifies (among others) a... | <p>I just looked at two editions of the book on line (Chapter 5, "Classification"; section "Logistic Regression," subsection "Logistic Regression and the GLM"). There is a discrepancy between the <a href="https://www.oreilly.com/library/view/practical-statistics-for/9781491952955/" rel="no... | 154 |
logistic regression | unexpected logistic regression coefficients - opposite to chi square/cross tabs | https://stats.stackexchange.com/questions/275124/unexpected-logistic-regression-coefficients-opposite-to-chi-square-cross-tabs | <p>I'm interpreting the coefficients of a regression with all categorical variables and all but one make sense, in that I was expecting the association/direction from my descriptive statistics. I know that the regression controls for other variables, but one coefficient makes no sense - in other words the opposite to w... | 155 | |
logistic regression | Logistic regression with zero event in one category | https://stats.stackexchange.com/questions/275216/logistic-regression-with-zero-event-in-one-category | <p>I have a dataset with more 15 independent variables trying explain a binary outcome. The results seemed dubious and the confidence interval profiling failed by providing lower bounds of the confint larger than the upper bounds-- I found the variable creating this mess which is a four category variable. Furthermore, ... | 156 | |
logistic regression | Can I model one prevalence on another? | https://stats.stackexchange.com/questions/278316/can-i-model-one-prevalence-on-another | <p>I have 52,840 survey responses covering 2012-2015. I've produced 14 different small area estimates for survey variables like obesity, binge drinking, smoking, etc. These estimates were created using a generalized linear mixed model approach. </p>
<p>I'd like to see whether or not there are overlapping areas with h... | 157 | |
logistic regression | Logistic Regression with Multiple Independent Variables vs One Independent Variable | https://stats.stackexchange.com/questions/278367/logistic-regression-with-multiple-independent-variables-vs-one-independent-varia | <p>Will the estimates and odds ratios change for an independent variable if it is by itself vs if there are other independent variables? I would think that it would change since thinking of it as an equation $y=x$ (one variable) is different than $y=x+z+q$ (3 variables).</p>
| <p>The estimate of the effect of $x$ will certainly change if $z$ or $q$ (or both) have an effect on $y$ net of $x$. It will change even if $z$ and $q$ are orthogonal to $x$ as long as $z$ and $q$ explain any portion of $y$. This happens because adding new variables changes the scale in which the entire model is expres... | 158 |
logistic regression | Probability notation in logistic regression | https://stats.stackexchange.com/questions/279245/probability-notation-in-logistic-regression | <p>I found these expressions for the probability of an outcome $y$ given variables $x$ and parameter $W$. $\theta$ is the logistic function.</p>
<p>$p(y \mid x,W) = Bernoulli(y \mid \theta(W^\intercal X) ) )$ </p>
<p>adapted from [<a href="https://mitpress.mit.edu/books/machine-learning-0" rel="nofollow noreferrer">1... | <p>The first equation cannot be correct. The left hand size is a number, and the right hand side is a distribution (so it does not type check). The correct way to write what the first equation is getting at is</p>
<p>$$ y \mid X, W \sim Bernoulli(y, p = \theta(W^\intercal X) ) ) $$</p>
<p>where $\sim$ is pronounced... | 159 |
logistic regression | Logistic regression with multiple dependent variables in a single model | https://stats.stackexchange.com/questions/278900/logistic-regression-with-multiple-dependent-variables-in-a-single-model | <p>Imagine I have objects with 5 different properties which are either present (1) or not (0). Further, I have some other variables that I expect to predict the presence of a property.</p>
<p>Focusing on a single property out of the five, I could use a logistic regression to infer the influence of my variables on the ... | <p>What you are describing is a <strong>multivariate logistic regression</strong>, NOT a multiple logistic regression. Note that by convention:</p>
<ol>
<li>multivariate implies >1 dependent/target variable </li>
<li>multiple implies >1 independent/predictor variable and only 1 dependent/target variable</li>
</ol>
... | 160 |
logistic regression | Logistic Regression -- Question about inverse of a features probability | https://stats.stackexchange.com/questions/299791/logistic-regression-question-about-inverse-of-a-features-probability | <p>I'm working on a customer churn model. Currently i have a variable for increased returns (1/0). After i run the model and convert the coefficient to and odds ratio, then convert that to probability; I wind up with 70%. (Churn =1, Not Churn = 0)</p>
<p>My question is can i use the inverse of this probability to say ... | <p>If
$$P(churn = 1 \mid increasedReturns = 1) = 0.70$$
then
$$P(churn = 0 \mid increasedReturns = 1) = 0.30$$ </p>
<p>70% is the probability of churn <em>given</em> that the customer has increased returns.</p>
<p>So, 30% is the probability of "no churn" given that the customer has increased returns.</p>
<p>To find... | 161 |
logistic regression | How to build a model with a continuous response variable bounded from 0 to 1? | https://stats.stackexchange.com/questions/305056/how-to-build-a-model-with-a-continuous-response-variable-bounded-from-0-to-1 | <p>How to build a regression model with a continuous response variable bounded from 0 to 1? </p>
<p>I think it is not logistic regression, where I am not predicting a binary response variable, Right?</p>
<p>Sorry for duplication if any, I tried to search but not find. (I feel this question must be asked many times.)<... | 162 | |
logistic regression | Sample Size and No. of Events in Logistics Regression Model | https://stats.stackexchange.com/questions/323802/sample-size-and-no-of-events-in-logistics-regression-model | <p>I want to develop a logistic regression model. There are 1000 cases in the dataset and there are only 180 'Yes'. Therefore, the proportion is 18%.
I was told that I should have at least 500 Yes in the dataset in order to build a good logistic regression model. How can I handle this problem? Do I need to have at lea... | 163 | |
logistic regression | High odds ratio and insignificant p-value in multiple logistic regression | https://stats.stackexchange.com/questions/326452/high-odds-ratio-and-insignificant-p-value-in-multiple-logistic-regression | <p>question 1:
I have 6 variables where 2 binary predictor variables have a much higher odds ratio than the other variables. One variable has 8.40 odds ratio and the second has 3.16 odds ratio. The other variables are between 1.42 and 1.54 odds ratio. It seems like the variable with 1.42 odds ratio would be a much mor... | 164 | |
logistic regression | Can I squareroot r2 to get r in a logistic regression? | https://stats.stackexchange.com/questions/328874/can-i-squareroot-r2-to-get-r-in-a-logistic-regression | <p>I am conducting a meta-analysis and I am extracting pearson's correlation coefficient (r) from studies in order to meta-analyse them. Some studies have not used correlations so I am having to calculate r from the statistics they report. One study has reported a logistic regression, is it meaningful to squareroot r2 ... | <p>As you can probably tell from Whuber's comment, the short answer is no.</p>
<p>The relation between $R^2$ and pearson's correlation coefficient only exists for linear regression, and can then only be used the other way around (from Pearson's $r$ to $R^2$) because you wouldn't know whether you'd have to pick the pos... | 165 |
logistic regression | Running logistic Regression in SPSS | https://stats.stackexchange.com/questions/334024/running-logistic-regression-in-spss | <p>My survey data contains 10 different questions all recoded into 'Correct' (1) and 'Incorrect'. I have 2 IVs which are also categorical. I need to find out whether each treatment condition affects the answer to the questions. In order to do this in SPSS I have 2 options:</p>
<ol>
<li><p>Run binomial logistic regress... | <p>Questions about how to code are off topic here, but your question has a statistics component as well.</p>
<p>Multinomial logistic will not be right here, as far as I can tell. If you are interested in the number of correct answers then that would be the DV and you would use a count regression model such as Poisson ... | 166 |
logistic regression | how to use logistic regression for this scenario | https://stats.stackexchange.com/questions/331779/how-to-use-logistic-regression-for-this-scenario | <p>I want to know if <em>depending on country</em> will an individuals response to 6 different questions which predicts an outcome variable scored as (yes/no) differ. E.g someone from country X may score higher on the 6 questions which in turn predicts whether they answered yes/no to my outcome variable.
I'm confused o... | <p>If you have multiple people from each country and believe that people from one country have some similarity to each other (which seems reasonable) then you will violate the assumption of independent error and regular regression is not appropriate. </p>
<p>What you propose in your second paragraph is called stratif... | 167 |
logistic regression | When is bayesian logistic regression (MCMC) preferable to GLM logistic regression? | https://stats.stackexchange.com/questions/336895/when-is-bayesian-logistic-regression-mcmc-preferable-to-glm-logistic-regressio | <p>My current understanding is that logistic regression can be used for 2 tasks:</p>
<p>1) Binary Classification
2) Computing a probability between 0 and 1 for data generated by a Bernoulli process?</p>
<p>I also know there's more than one way to solve a logistic regression problem, one being the bayesian way, one be... | 168 | |
logistic regression | Non-linear logistic regression, one predictor with non-linear effect? | https://stats.stackexchange.com/questions/338396/non-linear-logistic-regression-one-predictor-with-non-linear-effect | <p>I'm a medical student and for a research project, I'm trying to predict the success of a medical procedure. An independent variable of interest is the amount of prior experience the doctor has performing the procedure. This effect is probably non-linear. In other words, you learn more the first time you try somethin... | 169 | |
logistic regression | Reporting binary regression models | https://stats.stackexchange.com/questions/341938/reporting-binary-regression-models | <p>For my study i used a model which had 6 independent factors that predicted a binary outcome variable (yes/no). The general assumption is that a higher score should predict a yes response. </p>
<p>I tested this model in two different countries to understand what predicts the outcome behaviour in each.
Should i first... | <p>To decide if you need to report one, two, or all three models, you should run yet one more model. In this new model, include a new dummy variable for the country. Include the interaction terms with the dummy variable. If any of the interaction terms with the dummy variable or the main effect for the dummy variable... | 170 |
logistic regression | ordered logistic regression unequal sample sizes | https://stats.stackexchange.com/questions/349063/ordered-logistic-regression-unequal-sample-sizes | <p>carried out an ordered logistic regression but sample sizes were not equal, one is much larger than the other (490) compared to 224 and 219, the result for this group was non-significant could this be the result of a larger sample size? If not, are there other negatives to having such big differences in cohort sizes... | <p>With a big enough sample size, even tiny differences would be significant. Your sample sizes seem fine, as long as the model is not very complex.</p>
<p>As to why your results are not significant, it could be that your model is simply not very strong - look at the effect sizes. </p>
| 171 |
logistic regression | Whenever I am building the first model in Logistic regression there is an error | https://stats.stackexchange.com/questions/368739/whenever-i-am-building-the-first-model-in-logistic-regression-there-is-an-error | <p>Whenever I am building the first model in logistic regression, it is throwing the error shown below. My code is:</p>
<pre><code>mo2 <- glm(train3$Medal ~ ., data = train3[, -15], family = "binomial")
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
contrasts can be applied only to facto... | <p>The error message indicates that you include in your model categorical variables (i.e., <code>factor</code>s in R) that only have one category/level. You could exclude those with the following code:</p>
<pre><code>keep <- function (x) {
if (is.factor(x) || is.character(x)) {
length(unique(x[!is.na(x)... | 172 |
logistic regression | logistic regression what does this mean? Then a link function must be used to reverse the logarithm transformation, exponentiating the modeled value | https://stats.stackexchange.com/questions/373980/logistic-regression-what-does-this-mean-then-a-link-function-must-be-used-to-re | <p>Can you offer any assistance on clarifying the meaning of the following content - specifically the section on "Then a link function must be used to reverse the logarithm transformation, exponentiating the modeled value." This analysis is logistic regression and analyzed in SPSS. Also, how are beta coefficients best... | <p>In your original model you have
<span class="math-container">$$
\ln [p / (1-p)] = B_0 + B_1X_1
$$</span>
so if there is a unit change in <span class="math-container">$X_1$</span> then it will change the left hand side by <span class="math-container">$B_1$</span> units. This is hard to interpret. So if you exponenti... | 173 |
logistic regression | logistic regression with high correlation but no significative variables | https://stats.stackexchange.com/questions/387069/logistic-regression-with-high-correlation-but-no-significative-variables | <p>I am working with logistic regression in R by means of glm. I have fitted a logistic (0-1) regression model with seven predictor variables. I obtain a model where the variables have high p-values (>0.1) (not significative) but the r^2 of Mcfadden is high (0.6).</p>
<p>McFadden is equivalent to Pearson's r^2 in line... | <p>There are several possible reasons which could be responsible for the scenario you describe.</p>
<p><strong>1. Collinearity among some or all of your predictor variables</strong></p>
<p>Did you check if some of your predictor variables are engaged in collinearity? That might be one possible explanation. You can us... | 174 |
logistic regression | Logistic regression on aggregated counts | https://stats.stackexchange.com/questions/388304/logistic-regression-on-aggregated-counts | <p>Normally when we do logistic regression, we would have a dataset something like:</p>
<pre><code> X1 X2 Y
1: A 3 0
2: A 4 0
3: A 3 0
4: B 4 1
</code></pre>
<p>(4 observations)</p>
<p>However, for some reasons, I only have the aggregated version:</p>
<pre><code> X1 X2 count Y_count
1: A 3 2 ... | 175 | |
logistic regression | How does a Logistic regression model converge if most variables are not linear with the log odds of the dependent variable? | https://stats.stackexchange.com/questions/388369/how-does-a-logistic-regression-model-converge-if-most-variables-are-not-linear-w | <p>I have a dataset (unfortunately cannot disclose any part of it) which has a binary response variable. For each independent variable, I calculate the log odds of the positive cases given each value of the IV and plot them to check linearity, i.e., x-axis is the IV and y-axis is the <span class="math-container">$logod... | <p>Maximum likelihood will give you the "best" parameters <em>given the model</em>, but "best" does not necessarily mean "good enough". Especially when your model is not very appropriate, the best given the bad model can be quite poor. However, that does not necessarily preclude the model from converging. </p>
| 176 |
logistic regression | What type of logistic regression should I use? | https://stats.stackexchange.com/questions/390514/what-type-of-logistic-regression-should-i-use | <p>I am conducting analysis to assess agreement between self-report and lab data on adherence to a certain drug intervention. I know that medication adherence in the population of interest can be influenced by variables such as age, sex, socioeconomic status, etc.. </p>
<p>I need to conduct logistic regression to dete... | <p>Assuming that by "type of logistic regression" you mean binary, ordinal or multinomial, it depends on the nature of your dependent variable.</p>
<p>If agreement for each person is a dichotomy - agree vs. not - then you want binary logistic. If agreement is ordinal - e.g. agree completely, agree somewhat, did not a... | 177 |
logistic regression | Interpreting coefficient of a logarithmic coefficient in a logistic regression | https://stats.stackexchange.com/questions/398932/interpreting-coefficient-of-a-logarithmic-coefficient-in-a-logistic-regression | <p>I have a regression with a log-transformed independent variable, and I would like to know the proper way to explain its effect on my binary dependent variable.</p>
<p>For example, say the equation is: </p>
<p>(binary_variable)i = b0 + -0.03(log_variable)i</p>
<p>Does a 1% increase in log_variable mean a 0.03% (or... | 178 | |
logistic regression | Dealing with logged outcome variable in a regression with zero values | https://stats.stackexchange.com/questions/403077/dealing-with-logged-outcome-variable-in-a-regression-with-zero-values | <p>I have been thinking about this for a while.</p>
<p>I have a panel dataset with two time periods. My outcome variable is personal income. Since this study was conducted in a low-income country and the entire set of respondents of women, I have a lot of zero, and near-zero values.</p>
<p>I initially changed the zer... | 179 | |
logistic regression | Regression model for matched retrospective cohort study with continuous response variable | https://stats.stackexchange.com/questions/404664/regression-model-for-matched-retrospective-cohort-study-with-continuous-response | <p>I have a retrospective cohort study with matching (1:3) done. The response variable is charity care which is a continuous variable and the primary independent variable is hospital ranking which is a binary variable. Most statistical books suggest conditional logistic regression model to account for matching when the... | 180 | |
logistic regression | Why can negatively correlated variables have similar beta-coeficients in logistic regression? | https://stats.stackexchange.com/questions/411332/why-can-negatively-correlated-variables-have-similar-beta-coeficients-in-logisti | <p>I try to predict whether households use a certain service (<strong>TRUE</strong> or <strong>FALSE</strong>) based on various variables, using logistic (LASSO) regression.</p>
<p>Among many others, I have the variables <strong>percentage man</strong> and <strong>percentage woman</strong>, which have a -.85 Pearson's... | 181 | |
logistic regression | guidance on how to conduct a logistic regression with three categorical dependent variables | https://stats.stackexchange.com/questions/415360/guidance-on-how-to-conduct-a-logistic-regression-with-three-categorical-dependen | <p>I am also looking for guidance on how to conduct a logistic regression with three categorical dependent variables. My two independent variables are dichotomous and experimentally manipulated. Of the three dependent variables: two are dichotomous, one has four categories. None of the categories in the IVs or DVs are ... | 182 | |
logistic regression | having trouble interpreting confint function using R (logistic regression) | https://stats.stackexchange.com/questions/417708/having-trouble-interpreting-confint-function-using-r-logistic-regression | <p>I'm trying to interpret these results of using R confint function , but I can not understand. This is a logistic regression about breast cancer. how to interpret confint function. What the 2.5% and 97.5% means?</p>
<pre><code>logit1 = glm(goodmodel, data=train, family=binomial(link = logit))
summary(logit1)
confint... | 183 | |
logistic regression | Logistic regression: do not include variable used in regression in linear equation for predicted Y | https://stats.stackexchange.com/questions/419000/logistic-regression-do-not-include-variable-used-in-regression-in-linear-equati | <p>I am setting up a logistic regression using the following (simplified) form:</p>
<p>Logit(Y) = Constant + A<em>x + B</em>z</p>
<p>The real-life scenario is that I am trying to understand the probability of a sales prospect converting from a phone call and x = time_from_prospect_upload_to_call and z = channel of pr... | 184 | |
logistic regression | About binary logistic regression | https://stats.stackexchange.com/questions/426854/about-binary-logistic-regression | <ol>
<li><p>I have been told that Nagelkerke should not be used in a model of binary logistic regression, but instead a R2 as a measure of goodness of fit. So, how can I apply R2 if I am not using a linear regression.</p></li>
<li><p>How can I compare 2 or 3 models of binary logistic regression? is there any software?<... | 185 | |
logistic regression | How to have better confidence in my logistic regression model | https://stats.stackexchange.com/questions/436585/how-to-have-better-confidence-in-my-logistic-regression-model | <p>I have been working on a logistic regression model to predict 'yeses' in a yes/no classification problem. The objective of my problem is not necessarily to predict the outcome, but it's rather to just get a better understanding of my variables and how they influence the outcome. </p>
<p>For example, I want to say t... | 186 | |
logistic regression | The basic idea of regression with multiple data | https://stats.stackexchange.com/questions/458028/the-basic-idea-of-regression-with-multiple-data | <p>I am learning the tool of regression. In the text, I was introduced with the measurement of the diameter of different spheres of the same material many times and estimate the volume with formula. In this case, the variable X is the diameter and the Y is the resulting volume. It is easy to understand. But I was given... | 187 | |
logistic regression | Normalizing logistic regression probabilities to fixed number | https://stats.stackexchange.com/questions/458913/normalizing-logistic-regression-probabilities-to-fixed-number | <p>I have run a logistic regression model on a target variable and get a list of probabilities like [0.50, 0.30, 0.20, 0.10, 0.05, 0.05, 0.01].</p>
<p>For the target situation, I know that there are always going to be 3 positive results. I’m looking at a soccer league and comparing some stats (goals, last year rank, e... | 188 | |
logistic regression | Interpreting the logistic model intercept | https://stats.stackexchange.com/questions/464571/interpreting-the-logistic-model-intercept | <p>I have fitted the logistic model that has coefficient of age and level of income. The dataset has values for age 18-60 so my thinking is that since we cannot set age to 0, interpreting the intercept will not make sense. Am I thinking right? </p>
| <p>Exactly.</p>
<p>Interpreting the intercept in <em>any</em> model only makes sense if a setting of zero for all predictors (and the reference level for factor predictors) makes sense. And setting age to zero for a model for income obviously doesn't.</p>
<p>(I don't know whether discretizing income, which is a conti... | 189 |
logistic regression | How can the intercept of a logistic regression be more than 1? | https://stats.stackexchange.com/questions/467542/how-can-the-intercept-of-a-logistic-regression-be-more-than-1 | <p>I have a model with one predictor and 1 control variable. The dependent variable is binary, either 0 or 1. </p>
<p>But the intercept is around 2.5? How is this possible? I thought the logistic regression would limit the function between 0 and 1?</p>
| <p>The logit scale goes from minus infinity to infinity. So there is nothing anomalous with it. A logit value approaching plus infinity back transforms to a probability approaching 1. And a logit value approaching minus infinity corresponds to a probability approaching zero. A logit value of zero corresponds to a proba... | 190 |
logistic regression | Combining exposure variable | https://stats.stackexchange.com/questions/271065/combining-exposure-variable | <p>I have few exposure variables (from a survey N= 1241) two of which are 1) dichotomous response of the question: "Did you have enough water in past 30 days?" and 2) dichotomous response of "Have you spent 2 or more days without water in past 30 days?". I want to run logistic regression to see if they are related with... | 191 | |
logistic regression | Understanding Multiple Logistic Regression Interactions | https://stats.stackexchange.com/questions/283026/understanding-multiple-logistic-regression-interactions | <p>I ran a logistic regression with categorical variables. The estimates and odds ratios are:
Marital_Status- Estimate: .6605 Odds Ratio: 3.747
Professional Suffix: .5342 Odds Ratio: 2.911</p>
<p>I understand that the odds ratio says :
"The odds of the dependent variable happening is 3.747 times higher if someone ... | <p>The interpretation you suggest is in fact the one that is expected. Interaction effects and the effects of the constituent predictors need to be interpreted jointly, and one computes marginal effects for this.</p>
<p>See e.g. Buis M. 2010. "Stata tip 87: Interpretation of interactions in nonlinear
models" <em>The S... | 192 |
logistic regression | how to incorporate two categorical variables in a logistic regression? | https://stats.stackexchange.com/questions/513131/how-to-incorporate-two-categorical-variables-in-a-logistic-regression | <p>I have two categorical variables and I want to run a binary logistic regression. I am stuck about checking the multicollinearity between the two and how to incorporate them.</p>
| <p>The predictors, let's call them var1 and var2, will be turned into dummy variables by the software performing your logistic regression. For example, if var1 and var2 were binary (i.e. values of 0 or 1), the model would look like:
<span class="math-container">$logit(p)=log(\frac{p}{1-p})=\beta0+\beta1\times var1 +\be... | 193 |
logistic regression | The OR and 95% CI for logistic regression were very high! | https://stats.stackexchange.com/questions/81439/the-or-and-95-ci-for-logistic-regression-were-very-high | <p>I have done binary logistic regression for a dichotomous outcome and used 5 predictors (3 continuous and 2 dichotomous); one of the dichotomous predictor gave a big number of OR and 95% CI (108.28, CI= 6.64- 1764.6, $p < .001$). Is such a big number okay to report, or is something wrong? Sample size was 55 cases.... | 194 | |
logistic regression | Choice of discrete, non-monotonic response model | https://stats.stackexchange.com/questions/154833/choice-of-discrete-non-monotonic-response-model | <p>Suppose I have data from coin-flip experiments done in differenet conditions X. I want to estimate P(X), the probability of getting heads.</p>
<p>What I would normaly do is try logistic regression, where I assume $P(X) = \frac{1}{1+e^{\beta (X-X_0)}}$, but in this case I know for sure that the probability is not mo... | 195 | |
logistic regression | Choose a model when the Hosmer and Lemeshow test is significant | https://stats.stackexchange.com/questions/271025/choose-a-model-when-the-hosmer-and-lemeshow-test-is-significant | <p>I am using logistic regression (PROC LOGISTIC) and for both of my two models, the Hosmer and Lemeshow Test is significant. I also computed AUC :</p>
<p>AUC(model 1) = 0.583 and AUC(model 2) = 0.604.</p>
<p>How can I choose one of them ?</p>
| <p>Model 2 has the higher area under the response curve. So it therefore appears to be slightly better.</p>
| 196 |
logistic regression | Regression analysis - two models instead of one? | https://stats.stackexchange.com/questions/524622/regression-analysis-two-models-instead-of-one | <p>Hey I want to build a model which predict probability of bankruptcy. One of my independent variables is categorical and takes only two values: 1 or 0. How to decide if I should create two separate models becauase of this variable? Which tests should I use?</p>
| <p>It is totally fine to have a categorical variable in your regression model. For example, consider studying the effect of education on wages. We might right a model like:</p>
<p><span class="math-container">$$wage_i = \beta_0 + \beta_1\times educ_i + \beta_2\times male_i$$</span></p>
<p>Where both education and male... | 197 |
logistic regression | How can I express a logistic regression equation | https://stats.stackexchange.com/questions/526540/how-can-i-express-a-logistic-regression-equation | <p>I see a lot of examples of linear regression like this:</p>
<p>y = a1<em>x1 + a2</em>x2 + a3<em>x3 + a4</em>x4 + (a3*a5)<em>x5 + (a4</em>a5)*x6.</p>
<p>But I would like to write something similar for a logistic regression. I am not interested in being mathematically precise because the message I want to convey is si... | <p>logistic regression is a specific part of generalised linear models (GLM) where you can found more here <a href="https://en.wikipedia.org/wiki/Generalized_linear_model" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Generalized_linear_model</a>.</p>
<p>As for logistic regression,
let's say that you have y a... | 198 |
logistic regression | How do you convert a log odds ratio into a marginal effect? | https://stats.stackexchange.com/questions/423167/how-do-you-convert-a-log-odds-ratio-into-a-marginal-effect | <p>Basically, how do you convert a one unit change in <span class="math-container">$x_1$</span> to a <span class="math-container">$Z\%$</span> change in <span class="math-container">$Y$</span>?</p>
| <p>You can't (not without more information). The point here is that the logit / logistic is not a <a href="https://en.wikipedia.org/wiki/Affine_transformation" rel="nofollow noreferrer">linear transformation</a>. Therefore, you cannot get a constant correspondence between a starting percentage and a subsequent percen... | 199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.