13 questions
0
votes
0
answers
27
views
Logistic regression variables correlation but low GVIF
I'm making a logistic regression model to predict female presence on boards in tech SMEs. I was going to take out companies with only 1 employee, as they don't have boards, but my supervisor told me ...
0
votes
0
answers
33
views
Assumptions Moderation Process Macro
I am doing a moderation analysis via Process macro (SPSS). I want to check my assumptions (linearity, normality of the residuals, homoscedasticity of the residuals, multicollinearity, outliers, ...).
...
0
votes
0
answers
56
views
Normality Issue with `gam.check()` after adding Random Effect
I am trying to run a GAM that includes 8 input variables (see code below). I first ran the model without accounting for any random effect and the gam.check() appeared to be a good fit. After I add the ...
2
votes
3
answers
256
views
How to tell the compiler a function argument will never be zero?
Imagine I have a dummy C function like this:
void Dummy(uint64* dest, const size_t count)
{
for (size_t ii = 0; ii < count; ii += 8) {
*dest++ = (uint64)dest;
}
}
If you look at what the ...
0
votes
1
answer
46
views
How the number of agents in a population affect the number of messages received by another agent type when using sendToAll?
I built a model in which Agent type A goes through statecharts based on receiving a message from Agent type B. The model works, but I don't understand what assumptions the software is making.
For ...
0
votes
1
answer
207
views
Is there a replacement for assumeThat in JUnit 5?
I am migrating code from JUnit 4 to JUnit 5. Is there any replacement for the method Assume.assumeThat?
2
votes
1
answer
50
views
sympy equality test with complex rational functions gives None (unknown)
When an expression is a ratio with powers that I expect sympy (v1.12) to be able to cancel, I sometimes get results I don't understand. Here's an example. Notice that all of the symbols except d and n ...
0
votes
0
answers
412
views
Spatial autocorrelation in residuals of spaMM model after controlling for it
I am trying to control for spatial variation which I suspect to be strong in my dataset. I am comparing a linear model from lme4 with 3 explanatory variables - 1 continuous fixed effect, 1 discrete ...
2
votes
3
answers
366
views
What happens if an assumption, i.e. [[assume]] fails in a constant expression?
In C++23, the [[assume(conditonal-expression)]] attribute makes it so that if conditional-expression doesn't evaluate to true, the behavior is undefined.
For example:
int div(int x, int y) {
[[...
25
votes
2
answers
1k
views
What happens when an assumption, i.e. [[assume]] contains UB?
In C++23, the [[assume(expression)]] attribute makes it so that if expression is false, the behavior is undefined.
For example:
int div(int x, int y) {
[[assume(y == 1)]];
return x / y;
}
...
3
votes
1
answer
520
views
Is it possible to make MSVC's __assume(0) aka std::unreachable() actually optimize?
Compiling the following code with MSVC
#include <mmintrin.h>
#include <utility>
static auto bit_width(unsigned long x) {
unsigned long i;
_BitScanReverse(&i, x);
++i;
...
6
votes
1
answer
230
views
Why is [[assume]] not evaluated but also potentially evaluated?
The cppreference page for [[assume]] says that:
[[assume( expression )]]
[...]
the expression is not evaluated (but it is still potentially evaluated).
This wording confuses me. Is cppreference ...
9
votes
3
answers
6k
views
Reproducing clang's __builtin_assume for GCC
Recently, I discovered void __builtin_assume(bool) for clang, which can provide additional information about the state of the program to the compiler. This can make a huge difference, like for example:...