770 questions
-1
votes
0
answers
65
views
How to calculate variance of columns by avoiding zeroes? [closed]
I have a trait matrix in which column values represent traits (log10 transformed body-mass values). As the body mass is log-transformed, it will have both +ve and -ve values. But any 0s in those ...
Advice
0
votes
5
replies
86
views
SEs are altered when converting predicted values from a 'svrepstat' object into a data frame
folks-
I'm using the wonderful 'survey' library in R, but running into a problem when I use predict to recover the predicted point estimates and standard errors, then convert them into a data frame to ...
2
votes
0
answers
99
views
Quantify sum of squared differences in a robust multilinear regression in R
I would like to obtain estimates of the variance explained by each predictor in multiple regression using robust linear regression (for instance with the R function lmrob from robustbase R package or ...
5
votes
1
answer
96
views
How do I replicate Stata's quadvariance() function for high-precision variance calculation in R?
In Stata, there's a function called quadvariance() which computes variance using quad precision (extended floating-point arithmetic) to reduce numerical errors, especially in datasets with very small ...
3
votes
0
answers
64
views
Variance Annotation for an independent Method level type parameters in scala?
Consider this example from book Programming in Scala, 5th Edition by Martin Odersky (Chapter 18 · Type Parameterization)
Here - the following class Cat is described:
abstract class Cat[-T, +U]:
def ...
0
votes
1
answer
94
views
Plan/Actual/Variance for absolute AND relative metrics in DAX (Excel, not PBI)
I'm trying to find an unified approach to show Plan/Actual/Variance for both absolute and relative metrics.
There are several datasets, which are generally structured similarly. They have
Dates (...
2
votes
0
answers
115
views
Regarding the contravariance of fn(&'a i32) -> ()
As is well known, contravariance is quite rare in Rust. According to the Rust Reference on variance, only fn(T) -> () is contravariant on T. I’ve never fully understood how the following conclusion ...
0
votes
0
answers
63
views
Scala function consume and return the same upper-bound type
Consider the following:
sealed trait IntTree
case class Leaf(value: Int) extends IntTree
case class Branch(left: IntTree, value: Int, right : IntTree)
def test[A <: IntTree](x: A): A = {
...
3
votes
2
answers
270
views
Calculate threshold, so that 99% of random string have higher entropy
I am trying to calculate the distribution of the Shannon entropy for all possible random strings of length N.
(by random, I mean that each letter at each position is picked with equal probability)
To ...
1
vote
1
answer
73
views
How to optimally stretch and uniformize 1-dimensional integer points?
The data:
Let X be an array of labeled integers roughly in the domain [0, 2000000]. The size |X| is around 3000 elements. The labels are in the domain [A, B, C].
For example: [(13, A), (16, B), (32, A)...
1
vote
0
answers
42
views
How to check if a variable varies across timestamps or across samples
Let's assume we have some time-series data where every person (sample) has measurements for 2 variables (Var1, Var2) for three timepoints. Following is a dummy representation of the data.
Is there a ...
1
vote
0
answers
145
views
Calculating variance of gradient of barren plateau problem in quantum variational circuit
In paper Cost function dependent barren plateaus in shallow
parametrized quantum circuits, the author exhibit an warm-up example in page 2 to show the barren plateau phenomenon. In this example, the ...
0
votes
1
answer
182
views
Strange values for r2_nakagawa() with easystats
I have been evaluating the quality of modelfit with the easystats package (0.7.1.3). Since I have mixed models I use the r2_nakagawa() function and since the last update I did (easystats::...
0
votes
0
answers
174
views
variance partitioning vegan provide results higher than 100%
I am running the variance partitioning function in vegan (varpart). I get the following graph. If you sum them up the total variance reported in the plot is more than 100%. I would expect to be 100-22....
0
votes
1
answer
383
views
Error while using variance_inflation_factor in Python
I want to VIF analysis on a dataset df. Here, X is the subsetset of df with only the independant variables.
This is my code:
from statsmodels.stats.outliers_influence import variance_inflation_factor
...