instruction
stringlengths
9
38.7k
From a course of AI for Medical Diagnosis, it is explained that validation and test sets should be balanced, 50-50 cases of both cases 0 and 1, so that the performance of the model can be assessed. But one question arise, test set is suppossed to reflect reality, so it should be imbalanced meanwhile train set should be...
I am comparing a set of 5 genes between two groups . For the Multiple hypothessis correction (BH test) do i need to correct for only 5 genes if i find two of them have p value less than 0.05 - do i need to consider the total number of genes that are differentially expressed in those two groups or can i consider multip...
On page 66, the authors of article of ADMM says that the algorithm can be modified to obtain the intercept term easily in the sparse logistic regression model. Can someone explain this easy modification, please? (We assume that the intercept term is not penalized. So adding a column of ones to the design matrix does no...
I am trying to build a neural net to predict binary output [0,1]. I have a pretty small dataset 600 samples, 200 of them label 0, 400 of them label 1. I have 23 features, some of them are categorical( I encode them using pd.get_dummies).My target is a column "Status" with values: 0 for 'Terminated' and '1' for Active...
I would like to compare two contour plots representing two probability distributions. These are not samples drawn from any known distribution, but the result of a physical calculation from a process in an atom. In particular, I would like to know how similar these two distributions are to quantitatively answer question...
Just as an example, let's say I am modeling the rolling of a die. We can use the frequentist definition of probability to define a probability of an event, say rolling a 6, as the $\lim_{n\to\infty}$$\frac{n_6}{n}$, where n is the total number of rolls and $n_6$ is the number of times we obtain a 6. I usually then see ...
Making the cut-off, I see two multivariante outlieres in the plot and get 4 numbers printet in my console. (43 and 2 in the first row and 2 and 23 in the second row) What do they stand for? How can I interprete the result? Are there cases, when I better not impute them or delete the entire row in the data set?
I have a dataset of scan sampling done on animals in intervals of 20 minutes. Each observation, an animal is categorized by category 1 (A, B, C, D, or E) and by category 2 (1, 2, 3, or 4). I am trying to determine if the animals that belong to certain classes in category 1 have a tendency to be in certain classes in ca...
I am looking to analyse the impact (causal effect) of a conflict on firm valuation (using daily stock prices) for a sample of around 800 firms (I currently have this data over a sample period of around 365 days) so its panel data. I want to analyse the overall impact but also identify the difference in impact between t...
I have a dataset of genotype performance (that's my independent variable) in different growing environments. I want to know if there are interactions between genotypes and the different environments and if the genotypes can be distinguished from each other regardless of the environment. I'm using statsmodels in python ...
The covariate balancing propensity score (CBPS) described by Imai and Ratkovic (2014) involves fitting a logistic regression for the propensity score $\pi_\beta(\mathbf{X}) = P(T = 1\vert\mathbf{X})$ using generalized method of moments (GMM), using covariate balancing moment conditions to augment the usual moment condi...
We conducted an experiment to test the effect of a map annotated with the height of landscape features on participant's estimates of height relative to that recorded by a UAV. We asked them to record the height to the nearest metre before and after access to a map. In addition to analysing the difference between UAV an...
I am performing an ANOVA on a dataset with three discrete fixed factors (treatment A with 10 levels; Treatment B with three levels; and 4 sites) which includes all possible interactions. It is completely orthogonal and balanced. Aside from determining whether treatments and interactions are statistically significant, I...
What aspects do I need to consider when plotting a smooth curve with the LOESS method (geom_smooth) using predicted means from a linear mixed model? My data consists of longitudinal psychological scale scores across 12 timepoints. I treated the timepoints as 12 separate levels of a factor. I hope to show how psychologi...
I work for a public child welfare agency. We have something called a level of care tool that categorizes children based on the amount of care they need. This helps us identify appropriate care options for the child. A level of care 1 is a child who needs the "standard" amount of care (these are usually children who are...
I have the following output from a mixed-effects linear regression model with an interaction. This model comprises: A continuous outcome (ranging from 590 to 1401). A group variable (binary; control vs. treatment). A continuous covariate (ranging from 0 to 1). An interaction term between a group variable and a covaria...
I am trying to get a better understanding of what the postMDS function in R's vegan package is actually doing. I tried reading the documentation, but am having a hard time understanding it. I also tried looking at the source code, but it doesn't seem to be loading. Can anyone reframe what the documentation is trying to...
I have a logistic regression model, where my outcome variable is a disease with yes and no outcome. We know that age is highly correlated with this disease. I have the data for a protein of interest and want to see whether this protein P has a relation with the disease. When I use protein alone as a predictor in the lo...
I was given an ANOVA table and asked to reduce the model sequentially. I searched the online resources say: When reducing the model sequentially, you typically start by assessing the significance of high-order terms and then proceed to lower-order terms if necessary. Does that mean when reducing a model, we always begi...
The incidence rate ratio (and 95% confidence interval) of rotavirus gastroenteritis for the vaccine group compared to the placebo group is $0.67 (0.55, 0.82)$. I want to know approximately how many cases of rotavirus gastroenteritis would be prevented over a 60 week period after giving 10,000 infants the vaccine, as op...
I conducted a randomized block design experiment to measure a traits in a population of plants in a growth chamber. I have 3 blocks (shelf heigh) each containing 3 subblocks (shelf position), each containing 12 subblocks (tray position), as well as x and y coordinates. This website helped me nest the blocks within each...
For the pairwise comparison, the p value is less than 0.001. However, the p value for Mauchly's test of sphericity is also <0.001. I believe that SPSS automatically applies the Greenhouse-Geisser or Huynh-Feldt correction. So does this mean that the p value for the pairwise comparison is still valid?
I am modelling house prices using individual observations of property sales (not polygon data). Does it make sense to include dummy variables for postcode areas as parameters in the GWR model?
I'm looking to understand the differences between the functions for probabilities induced in an identified multinomial GLM, and the softmax function commonly used in classification for neural networks. Consider two "versions" of the softmax function. First, the softmax used in a neural network. Suppose we have $K$ clas...
I am using random forest in R, and for different test sets I'm using patterned seeds in the sample function. For one test set I use 1234, for the next 2345, the next 3456. I suspect it is unlikely, but could this introduce bias of some sort?
I have a panel dataset and my dependent variable is the logit-transformed share of farm workers on long-term contracts. I am particularly interested in the effect of pastoral focus in agriculture, represented by variable pastoral. The difficulty is two-fold. First, the impact of this variable changes over time. Second...
Say I am fitting a (linear) regression model to a hundred-row dataset, whose data records a series of experiments that I can hardly reproduce or further conduct to get more records, I notice that there are multiple columns/features x1, ..., xn that are essentially derivation of a more fundamental property named X. Now,...
I'm planning to use an algorithm called Harmony, designed for data normalization, particularly in the context of single cell data analysis. Harmony operates by taking principal components (PCs) as input and outputting corrected principal components (PC'). Typically, Harmony is applied to the top k ranks of PCs to corre...
I need to calculate a very simple regression model outcome ~ predictor. To treat missings, I have to use FIML and also I need bootstrapping. Since the lavaan package in R provides both, I used this code: model <- sem('outcome ~ predictor', data = data, missing = "FIML", se="BOOTSTRAP", bootstrap = 2000, fixed.x = F) ...
I have a built a large Random Forest Classifier and was able to output the feature importance as below: I understand that this importance is a based on mean decreased impurity. But how to interpret this - for those with high relative importances, is it roughly the same as small p-value in linear regression? Moreover, ...
Given two random variables $X$ and $Y$, I know intuitively that $$ \mathbb{E}[X\,|\,Y]=\mathbb{E}[X\,|\,cY], $$ where $c$ is some non-random constant. My intuition tells me that scaling the conditioned random variable does not change the amount of information that we have conditioned on. Is there a more rigorous argume...
This was a homework problem where I was asked to find explicit expression that minimises the cost function. I found the solution as : $\hat{\theta} = (X^TX + \lambda I)^{-1}X^Ty$ Now the problem further asks : If lambda <=0 is this solution, still equivalent to minimising the cost function? I'm not able to figure out h...
As part of my graduate thesis, I've measured the satisfaction levels of a couple hundred respondents across 7 districts of a city about a local public service, using a 4-point ordinal Likert scale (ranging from 1: Very dissatisfied to 4: Very satisfied). What I'm trying is to see if there are any districts that signifi...
Now we have several independent and identically distributed random variables following the uniform distribution on the interval [0, 1].They are denoted as $x_1, x_2, x_3, ..., x_m$ and $y_1, y_2, ..., y_n$ respectively.Let $$ D_{i,j} = \begin{cases} x_i-y_j, & x_i\ge y_j \\\\ 1+x_i-y_j, & x_i<y_j \end{cases} $$ So, i...
Suppose $f \colon \mathbb R \to \{0, 1\}$ is a random function defined by $P(f(x) = 1)=p(x)$ for all $x \in \mathbb R$, where $p(x)$ is a sigmoid function (goes to zero for $x \to -\infty$, to one for $x \to \infty$, it is continuous and non-decreasing). I have samples $(x_i, f(x_i))$ for $i = 1, \ldots, N$. I'd like t...
I need a sanity check. I am working with a data set of force-time, displacement-time, and velocity-time signals. All of my signals are non-stationary, and they contain trends (low frequency variations) and periodicity (high-frequency variations). I am interested in analysing the frequency content of different signals a...
I try to derive the information matrix equality for the Poisson distribution with the log-Likelihood: $$\mathcal{L}(\lambda; x_1, x_2, \ldots, x_n) = \sum_{i=1}^{n} \left[-\lambda + x_i \log(\lambda) - \log(x_i!)\right]$$ The derivation by the Hessian matrix is clear to me and yield $I(\lambda) = \frac{n}{\lambda}$. So...
The relation between my dependent variable y and my independent variable x can be described by a logistic regression like: mod<-nls(y ~ SSlogis(x, asymp, infl, slope1), data = dat) # y~asymp/(1+exp((infl-x)/slope1)) However, I have two categories A and B for which I want my logistic model to fit two curves. For that, ...
In the following slide: it seems how it got A and B are independent is rather circular. The reason is it assumes $p(a,b,c) = p(a)p(b)p(c|a,b)$ and then marginalizes over $c$ to get $p(a,b) = p(a)p(b)$, while $p(a,b,c) = p(a,b)p(c|a,b) = p(a|b)p(b)p(c|a,b)$ instead. Am I correct? If yes then what is the correct way to ...
I want to analyze in paired data that has many dependent variables (continuous) and several categorical predictors. The predictors are: Group (patient/control), Treatment (none, t1, t2, t3), and Gene (several). The issue is that the treatments were not applied to all samples, so that controls received no treatment and ...
I am wanting to establish the impact mobile money has on Kenyan economic growth. I am building my regression model and have collected data for GDP, consumption, government spending, investment, net exports, mobile money agents, accounts and volume of transfers as my independent variables, labour and capital acting as m...
I have a dataset where I randomly sampled housing developments, and then within these I systematically sampled every habitat patch. I now have a dataset where each observation is a patch_ID, and I have variables recorded for the patch such as project_ID (the development it came from), Area_ha (the area of the patch, in...
Will unpaired t-test, definitely reject the null hypothesis if there is a non-zero difference in the population means for the two populations from which the samples are taken?
I am new at using logistic regression for binary classification problems, but am interested in using it to help determine winners and losers in this year's March Madness tournament. I have data arranged in a similar fashion to how it is in this blog, with "Team1" and information about its game stats along with "Team2" ...
I'm running a linear regression in R on a dataset with 8 independent variables. When I run the model with all variables: fullmodel <- lm(price ~ ., data = basedata) summary(fullmodel) I get an adj. R2 of 0.9901. However, there is a very clear outlier in the data, as confirmed by car::outlierTest(fullmodel). This obser...
In Wasserman's All of Statistics chapter 18, he defines the following undirected graph: Let $V$ be a set of random variables with distribution $\mathbb{P}$. Construct a graph with one vertex for each random variable in $V$. Omit the edge between a pair of variables $X,Y$ if they are independent given the rest of the va...
I would like to use a mixed model to test if the values in a response variable differ between two conditions that each subject underwent. On top, I would like to control for the influence of other continuous and categorical variables (without having any hypothesis on the specific influence of these covariates on the va...
When calculating the sample variance we divide by $n-1$ instead of $n$ to correct the bias that results in from using the sample mean instead of the population mean. My question is why do we only subtract 1 and not any other value? and why don't we divide by $n-2$ for example? Thanks for your help.
I have a dataset, where reagent x was added to a suspension to reach a certain value ŷ, which was set before the experiment. The actually measured value was y, which is my target value. My question is now, can I use ŷ and x (among others) for training to predict y?
I'm looking to conduct a counterfactual experiment in an e-commerce fraud context. When a fraud policy blocks a transaction you necessarily will never know if it was truly fraudulent. I'm trying to sample this blocked population with two goals in mind: Get a reasonable estimate of the false positive rate (ie. how many...
Given the known values, $$P(CD) = P(C|D)P(D)$$$$P(C^cD) = P(C^c|D)P(D) = (1 - P(C|D))P(D)$$ Then using these values we find, $$P(D|C) = \frac{P(CD)}{P(C)}, \, P(D|C^c) = \frac{P(C^cD)}{P(C^c)}$$ This gives us $P(D^c|C)$ and $P(D^c|C^c)$. Using these values $$ P(CD^c) = P(D^c|C)P(C)$$$$P(C^cD^c) = (D^c|C^c)P(C^c)$$ Now ...
I have an imbalanced dataset and I'm trying to predict a binary target. The minority class amounts to approximately 0.4% of all observations (60 million observations from which 250K belong to the minority class). I undersampled the majority class and oversampled the minority class so that the mean of my target column i...
I've been given some longitudinal data of animals given different glioblastoma treatments. In addition to conventional survival analysis, they want to look at animal weights and sizes of tumors along time. Of course, animals die through this process. How could I validly analyze this data, especially if it is likely tha...
I'm dealing with a discrete statistical test scenario where a significant portion of the P-values calculated are exactly 1.0, due to the nature of the test statistic not exceeding its observed value in many cases. In a dataset of 1,000 tests, approximately 700 yielded a P-value of 1. This concentration at 1.0 creates a...
I have been recently asked what is the difference between a Dose Response Function (DRF) estimation (as the one proposed in this link and this paper) and a statistical regression method. I therefore tried to create some toy synthetic examples in order to show some cases in which regression methods fail to estimate the ...
I would like to estimate the covariance matrix of returns from a set of time series that don't get updated regularly. To be precise, in my case all of the series fall into 2 classes. Class A gets updated daily and class B once every few days (but all at the same time). The underlying assumption is the actual hidden var...
If $(X, Y)$ follows a bivariate Gaussian distribution with mean ${\bf \mu}$ and covariance ${\bf \Sigma}$ with truncation bounds $(a_x, b_x, a_y, b_y)$, can we compute $E(XY)$ in closed form? If not, can we compute/estimate it quickly and efficiently? For context, I need to do thousands (or more) of these integrals and...
I have a balanced dataset where each object (song) has one of the four target class labels (mood of a song). Example: ID feature1 feture2 feature3 target_class 0 0.5 0.11 125 upbeat 1 0.23 0.75 136 sad Dataset has some outliers which I decided not to remove since they aren't measurement errors. I want to pr...
I'm currently working on a problem involving a linear mixed model of the form: $Y_i = X_i \beta + Z_i b_i + \epsilon_i,$ where $\epsilon_i \sim N (0, \sigma_{\epsilon}^2 I_{Ji})$. The model can also be represented as: $V_i = Z_i GZ_i^T + \sigma_{\epsilon}^2 I_{Ji} = \sigma_{\epsilon}^2 (I_{Ji} + Z_i QZ_i^T),$ with $Q =...
I am building GAMs of the following form (using R's mgcv notation) and would like to compare the fit between each model. model1 <- gam(dependent_var ~ metric + s(latitude,longitude) + s(UNIT, bs = 're'), data = df) model2 <- gam(de...
I have a set of clinical notes with dates for each patient and an NLP models which gives a score between 0.0 and 1.0 of a certain event being present in the note. Given the scores, what is the best way to determine the date when the event occurred. The basic idea is that once the event occurs we will see it mentioned f...
I am very new to the world of statistics and I need some help. I am currently doing an experiment and I have to analyze the data, but I honestly do not know anything about statistics (I have tried to attend some courses at the university, but they only deal with descriptive stat; I've learned a bit from some books but ...
I have a dataset of various features from 10 patients and 10 controls. Each patient has many data points. Random forest does an amazing job in predicting whether a data point is from a patient or a control when using a random 70%-30% train-test split or a 10 K fold cross validation. Then I realised this is because part...
I am considering showing how mis-calibrated a cox proportional hazard model is by plotting the 10th percentiles of risk on the x axis vs the incidence per 100,000. For each bin in x I could plot data points for both the predicted incidence and the observed incidence to compare their incidence per 100,000. However it se...
It is given that $E[X^n] = \frac{2}{5}(-1)^n + \frac{2^{n+1}}{5}+\frac{1}{5}$, where $n=1,2,3,\ldots.$ I need to find $P(|X-\frac{1}{2}| > 1)$. What my approach is : I have opened the modulus inequality and equated this probability to $1-P(\frac{-1}{2}<X<\frac{3}{2})$. This can only occur when X=0 and X=1, so that's wh...
In the DPO paper, and in particular in the proof attached below, how can we expand the KL divergence only as the log ratio of the probabilities of the two distributions? According to the definition the log should also be multiplied by the $\pi(y|x)$ term. Thanks!
I am running a multi-variate second order growth model. I have two factors, which are conceptually related to each other measured on 7 different occasions. Wanting to know how the two factors developed together overtime, I ran a multivariate growth curve with the two factors. When I first ran the model the model fit wa...
I wanted to forecast Dengue count for the given weather data covariates: MeanT Mean temperature MeanRH Mean relative humidity MeanSM Mean soil moisture MeanVP Mean vapor pressure MeanWS Mean wind speed MeanWG Mean wind gust DI Dengue incidence I tried using machine learning and stat models such as LSTM, 1D CNN,...
I am revisiting some basic concepts involving t-tests and ANOVAs, and got tripped up early. I wanted to apply the concept of lack-of-fit sum of squares to the single sample t-test but wonder how this can be treated as a ordinary LS problem, if at all. In linear least squares there are adjustable fitting parameters and ...
I'm trying to plot the ROC Curve for a number of target/object detection models and compare their performance. The pre-trained models in question take an input image and they output a mask image where each pixel is either white or black. I modified the code of these models such that, right before model decides if each ...
This model lmer (y ~ x + (1 + x | county)) can be written like that $a_j$ & $\beta_j$ show that the slope and the intercept is different (varying) per county $j$. $\mu_a$ & $\mu_\beta$ are the mean of intercept and slop. Nice. But where is the fixed effect coefficient for $x_i$ in this equation? Is it the $\mu_\beta$?...
"A random sample, of size 9, from a normally distributed population, with variance 9, yielded as sample mean of 7 and a sample variance of 7. I. What is the probability of a random sample of size 9 yielding a sample variance of 4 or less, given that the population variance is 9" Should I be using the chi-squared distri...
My friend asked me about histograms and sent me some examples given by their teachers and in the textbook. It is not like the histograms that I've learned at all. I was taught that the quantity represented by the area of the bars and the height of the bars represent frequency density and are calculated from bar width (...
While handling some demographic data, I stuck in a position where (I did not disclose the actual data set and whom it is concerning, therefore I replace it with hypothetical data) I could not reach a conclusion. Suppose we have 2 class of people; A and B. We have two ideologies/ political opinions, Alpha and Beta. Th...
For example, to estimate the population mean $\mu$, I am given two sample mean $\bar{x}_1$ and $\bar{x}_2$ from two (independent) data sets of $N_1$ and $N_2$ observations respectively. Without access to the data sets, I am told that the sample standard deviations are $s_1$ and $s_2$ and asked which sample mean should ...
I've just run a repeated measures ANOVA in SPSS, with one 3-level within-subjects variable, and one 3-level between-subjects variable. Is it correct to assume that one should be reporting the main within-subjects effect from the "tests of within subjects effects" table, and not the "tests of within subjects contrasts" ...
I am trying to run a binomial glmm to understand the relationship between various concentrations of a compound sensed by different castes of ants. We have 5 different compound concentrations (a-e), and 3 different castes (min, med, max). We tested this across 3 colonies (two, six, and seven) to see if they were interes...
I'm setting up a field experiment and want to make a solid plan for the analysis, since that's whereI get stressed in the process. I will deploy 26 pairs of traps. 13 pairs will be in urban forest, and the other half will be in rural forests. The 13 urban forest sites will be distinct from each other (13 local parks)...
In logistic regression we find the maximum likelihood estimator - $\max \prod_{i} p(y_i \mid x_i)$. Which in practice means maximizing the sum of log likelihoods. This makes sense, I understand MLE. But... what is wrong with simply maximizing the likelihoods? In other words, if our model is a simple logistic regression...
Is there a way to check if a sample of size N (e.g. 30) comes from a normal distribution with a known population mean and standard deviation? I'd like to use all the information available (the sample mean and standard deviation and the population mean and standard deviation) in the test. My understanding is that the t-...
If I have a million population of products and I will tolerate no error in them. How many samples should I test to be 95% sure that no error exists? I am new to statistics. I know you might need some assumptions about distribution. But I do not know much about it. Some make assumptions accordingly and please tell a way...
Let's say I have a kernel $K$, and another kernel of the form : $$ K' = e^K $$ now I know how to prove K' is a kernel, I can do it using taylor expansion of $e^x$ around $0$, but let's say if I want to find an explicit feature map that generates $K'$ given that $\phi(x)$ generates $K$. How do I do that, or is it even p...
I want to measure volatility in my customer base using the last 5 years of activity. That is, a total of purchases summed by year over a 5 year period. I plan to use this formula to calculate the variance (i.e. find the mean of the square deviations). I'm wondering if this is the right calculation to answer the questio...
I'm trying to build a CNN model for image classification, more specifically emotion classification using the FER+ dataset which is proving difficult to work with. I've tried several variations of models to work with ranging from 'from-scratch' to my current best solution - transfer learning. My best results so far have...
I have a dataset of many timeseries and I want to develop anomaly detection with neural networks for each individual timeseries. Are there any benefits training a generic model on the whole dataset first and then using transfer learning to create individual models for each timeseries?
I have this data frame: https://i.stack.imgur.com/EGh1z.png It is the binary recorded responses (repeated measures) of subjects to 4 different tests under 2 environmental conditions (2x4 factorial design with repeated measures on both factors). I am looking for any statistically significant difference that changes in c...
In response to a previous question posed about effect sizes with a generalized linear mixed model with a binomial distribution, it's been clarified that estimating effect sizes is not straightforward. I have a dataset with continuous predictors where family = gamma (link = "log") for each of my response variables. Afte...
I have a convolutional neural network that has already been trained on data A. The network consists of feature extraction layers and two classification layers. I have trained only it's last classification layer on data B from scratch(without initial weights trained on data A!). For that purpose, I followed two differen...
I would like to a sample from a Gaussian $N(0,K)$ where $K$ is a kernel gram matrix, so that $K=[K_{ij}]$ with $K_{ij} = k(x_i,x_j)$ for some positive definite function $k$. The first issue is that the two-dimensional grid I am interested in evaluating $x_i,x_j$ over is very fine, so the size of $K$ is extremely large,...
I am trying to find a relatively fast density estimation by matching RKHS embeddings. I am somehow surprised by my findings and would like a sanity check: I have some observations $y_1, ..., y_n \in [a, b]$, and a kernel $k$ with its RKHS $\mathcal H$. The kernel embedding of my observations can be written $\hat \mu = ...
I was exploring the KL Divergence and came across some research about calculating it from samples. On stack-exchange, I found out that minimising the KL Divergence is equivalent to minimising the Sum of squares in Linear Regression. To explore this further, I tried to implement a OLS and Ridge regression model for the ...
I am currently working on ridge regression, which can be interpreted using Bayesian statistics (DOI: 10.1016/j.electacta.2015.03.123). In particular, I know that the maximum-a-posteriori (MAP) estimate can be computed with its uncertainty. However, is it possible to evaluate the MAP when the 1-norm is used instead of t...
I am conducting research on Codling moth population/trap capture models. The end goal is to have a hypothesis testing model that will provide whether or not (at some significance level $\alpha$) the data supports the total number of moth captures for the generation to be above a certain threshold. The growers that I wo...
I have a dataset for countries. One variable is coded as 0,1,2 or 3. For one country, its values on this variable are 0,1 and 2 (i.e., there is no 3). I created three dummies for this variable (and not four), using one as the omitted category. I was wondering if this is correct? Similarly, for another country whose val...
I would like to get your help on which hypothesis testing method to choose for the following problem. Here is an example of my dataset. In December, We have collected data on vehicle speed of more than 90 KM/Hr. There are ~1200 vehicles. We have implemented some measures that might (or might not) impact the speed. Then...
Let me start off by saying I already know all the rigorous formulas, but let me explain why I still feel like something is missing in my understanding. There is no need for any answer going over e.g. the variance calculation for sums of i.i.d. random variables! That is not what this question is about. Basically, it com...
I ran a negative binomial regression with survey weights using the R package survey and the function svyglm() and observed a significant interaction effect (woohoo!). Now I want to understand the interaction using post-hoc tests. I tried using the packages emmeans but I got an error. Any ideas how do this kind of thing...
I'm using a Kalman filter, optimized via hyperparameter search for both the feature matrix (about 300 variables post my most recent hyperparameter grid search), a ridge regression-based observation model, and a shrinkage estimator for the noise covariance matrix. Despite a (seemingly) adequate fit, my post-fit measurem...
Suppose I have a basis spline $$ S(x) = \sum\limits_i N_{i,k} a_i $$ defined on the interval $x \in [a,b]$ with control points $a_i$, degree $k$. $N_i$ are the basis spline functions. The knot vector associated with $S$ is $t = [t_1, \dots, t_{n+p+1}]$. What I want is to obtain the piecewise polynomial form $$P_i(x) = ...
I'm seeing data whose rank-frequency curve is nearly log linear (b e^(a x)) but where the top few frequencies are higher than expected. The top fits a Bradford distribution well, and the middle is nearly perfectly log linear. f = b e^(a x) (x+c)/(x+d) is variant of the equation above that fits the data well: where c ...