1 vote
271 views

Why do ML models learn probability distributions and why does it matter?

I'm aware that this question is quite silly, but I've done reading and coded NNs for quite a while now, studied backpropagation and so on. However, I don't think I ever understood what is the ...
• 174
178 views

Making linear to logistic regression with sigmoid function - why is a transformation of predicted y needed?

I noticed that one can run a linear regression for binary outcomes and get the same predictions as from a logistic regression after using a sigmoid function. That is what I awaited. But the surprising ...
• 341
47 views

How to simulate non-standardized artificial data for logistic regression?

I would like to simulate data for a logistic regression with the predictor variables on their original scale. There are, of course, a litany of similar previous questions (e.g., here, here, and here). ...
28 views

How to simulate errors from any regression model? [duplicate]

I am trying to wrap my head around this: Other than a standard linear regression model, we almost never know the theoretical distributions of the error terms Thus, how do we simulate random errors ...
348 views

Linear probability model with crossentropy (log) loss

For better or for worse, some people shoehorn binary $y$ variables into an ordinary least squares linear regression. $$\mathbb E[Y\vert X]=\hat y=X\beta$$ If we encode the $y_i$ as either $0$ or $1$,...
• 65.2k
59 views

How to simulate artifical data for multinomial regression? [duplicate]

I want to use some predictors (for example, $x_1$ and $x_2$ below) to simulate the multinomial outcome (for example, with 3 levels). Below are the codes I found in another question regarding ...
58 views

What analysis to choose when I have one continuous and one nominal predictor and my dependent variable is binary?

So in my data, I have a continuous variable (say from 0.1 to 1) and a nominal variable indicating the condition (3 conditions, no drug, drug and baseline) and a binary dependent variable (0 or 1). So ...
• 21
105 views

Simulating logistic regression data for continuous by three-level categorical model

I am attempting to simulate data for a logistic regression model testing a continuous interaction with a three-level categorical factor. However, I am encountering a little bit of difficulty. When I ...
• 1,027
1 vote
416 views

Why can you not estimate Beta with least squares in logistic regression? [duplicate]

As the title says, why can you not estimate Beta (coefficients) in logistic regression with least-squares? I read in a book that it is not possible and that we use maximum likelihood instead, but I ...
2k views

341 views

How to generate binary outcome data where ridge or lasso outperforms simple logistic regression?

The answer is very easy to the question in the title, we just need a data set where $n<p$; thus, logistic regression MLE does not exist. Also if perfect separation occurs, ridge or lasso will be ...
• 51
412 views

simulated data of Poisson Distribution?

I was developing a set of simulated data of the following properties. def <- defData(def, varname = "GT", dist = "poisson", formula = "0.14 * BB", link = "log&...
• 199
782 views

Simulating potential outcomes with a binary outcome

I want to create some simple simulations of potential outcomes to explore issues of confounding. I start with a binary confounder X and a binary treatment A. When my outcome is continuous, I can ...