instruction
stringlengths
9
38.7k
Let $X_i$ be iid random variables. How does one show that $$ \frac{1}{n(n-1)}\sum_{i\neq j}^n \sin\left(X_i X_j\right) $$ converges almost surely to a constant?
I want to analyze data from same patients in two timepoints. The problem is the measurements have high variability between patients and it makes more sense to first adjust the observed value to the baseline, and compare them afterwards. This way however I am losing the baseline timepoint, and I am a bit unsure if a t t...
I'm using Mediapipe with Python to detect facial landmarks in a dataset of images of faces. Here's my issue. When I use Mediapipe on a single image of my dataset, it detects some coordinates, but when I do the same thing in a loop, iterating the code on every image of my dataset, the single image I mentioned above gets...
I'm doing analyses in R on 5 repeated observations over a period of 5 years (repeated/random dv: 'amount of professional health care', repeated/random IV's: 'amount of social support' with several other random and fixed variables/covariates) Multilevel Analysis seems one of the (most) correct analysis to me. 1: My main...
I have a dataset of Japan's Mortality rate and want to fit a natural cubic spline to this mortality data. The choice of knots are subjectively chosen at 10, 20, 30,...,90. I want to know whether or not it was a good choice to place those knots at those positions or not. Here the number of possible combinations of knot ...
I have the birth-death model $dy/dt = br \cdot x(t) - dr \cdot y(t)$ where the change of $y$ depends on the birth-rate $br$ and $x$ at timepoint $t$ and death rate $dr$ and $y$ at time point $t$. $x(t)$ and $y(t)$ are functions that model measured data including a confidence interval / standard deviation at time point ...
I know (but now I have doubts) that "Comparing models that are fitted with REML and differ in their fixed effects never makes sense," just as @BenBolker explains in this answer. I've been reading the book Ten Projects in Applied Statistics by P. McCullagh and, if I understand correctly, he doesn't agree with the above ...
What exactly is the difference between those two models: model 1: $Income_i = \beta_0 + \beta_1 \text{female}_i + \beta_2 \text{experience}_i + \beta_3 \text{female}_i \cdot \text{experience}_i + u_i$ vs. model 2: $Income_i = \beta_0 + \beta_1 \text{female}_i + \beta_2 \text{male}_i \cdot \text{experience}_i + \beta_3 ...
I am trying to solve the problem using conditional expectations. The expected value H is depends on the waiting time T and a set threshold X (a real number that is a constant random variable during simulation runs). But the waiting time T depends on the the number of new entrants Y in the system and these entrants arri...
I am implementing ARIMA from scratch, and I am trying to understand how to estimate the parameters by the MLE + innovations algorithm approach. The likelihood is given by (as in Shumway and Stoffer: Time Series Analysis and Its applications) \begin{equation} L(\beta, \sigma_w^2) = (2\pi\sigma_w^2)^{-n/2} (r_1(\beta) \c...
I have a general question regarding testing for look-ahead bias. Is there any technical test for look-ahead bias in training data? Especially in the context of time series forecasting e.g. predicting future price returns? All I can think of is checking for lead-lag correlation for each feature against the test set? But...
Im currently looking for a probabilty density function that posesses the following properties Should have range (0,1) $$ \lim_{\sigma \rightarrow 0} f(x) = \delta(1) $$ $$ \lim_{\sigma \rightarrow \infty} f(x) = \delta(0) + \delta(1) $$ So far the closest i have gotten is the Beta Distribution which fullfils the secon...
I am looking for some recommendations for books about the statistical analysis of clinical trials data, that also covers the design of clinical trial studies. I am familiar with Stephen Senn's book, "Statistical Issues in Drug Development", although I only have the 1st edition.
I would like to test the null hypothesis that there is no difference between the outcomes of the Spearmann correlation test run on pairs of data (x,y) from the original dataset I have , vs one where the y value may have been permuted or pairs of data (xi, yi) has been sampled with replacement (bootstrapping). I have c...
I need to compute the Inverse Mills Ratio after the probit command in Stata. From here, I found that predict IMR1, score, will calculate it and store it in IMR1. I just wanted to ensure that this is correct. Is there any documentation/paper that specifies this? Stata documentation for probit post estimation doesn't exp...
I am facing the following problem: I have access to iid $X_1,\dots ,X_{N_X}$ and $Y_1, \dots, Y_{N_Y}$ from $F_X$ and $F_Y$, respectively, where $X$ stochastically dominates $Y$. My goal is to conduct inference on the following two functionals, which I have already shown to bound a quantity of interest $\theta$: $$\the...
In regular likelihood/log likelihood, if there is random variable "$Y$" with pdf (probability distribution functions) $f_Y(y)$... the likelihood of this can be written as: $\mathcal{L}(y_i) = \prod_i {f_Y(y_i)}$. In Quasi Likelihood, it is no longer based on valid pdf. We write QL as : $$Q(\mu \mid y) = \int_{u,y} \fra...
I'm currently studying Lasso regression to use it as a variable selection method. When I get a plot like above, shouldn't X1 be the most important variable as it is the last variable to shrink to zero? But what I'm getting confused is that if the optimal log Lambda is -4, X1(black line) doesn't seem to be important co...
I have a panel data with companies and years as panel indicators. My test variable of interest is the level of corruption in the country in which the firm is located, which is a continuous variable that varies over time. My dependent variable is a firm level financial misconduct score. So my depednent variable is measu...
I am doing my thesis, and in my study design (a simulated negotiation) participants could choose from different messages (i.e., their negotiation strategy). The strategy variable is categorical (FR or IR) and therefore can be coded as binary (1,0) as it was for logistic regression exploring it as the outcome variable. ...
Assume I have the following dataset: building_id is_business is_resedential is_commercial 12 1 0 0 13 0 1 0 14 0 0 1 15 1 0 0 16 ...
The formal definition of stochastic boundedness $O_p(1)$ of a sequence of random variables $\{X_n\}$ goes $$\{X_n\} = O_p(1) \implies \forall \varepsilon >0, \quad \exists\, N_{\varepsilon}, \delta_{\varepsilon} \quad \text{ such that } \Pr(|X_n| \geq \delta_{\varepsilon}) \leq \varepsilon \quad \forall n> N_{\varepsi...
So I am reading an article about the estimation of species distributions, and cannot understand how to interpret the following graph (I am only referring to the bar graph on the left): The different colored bars represent the different predictor variables used to explain the variance in species richness (cumulative/mi...
I have run model selection for linear mixed effect models with random intercepts, built with lme4 package in R. The top model contains one continuous variable (A), 2 categorical variables (B and C) and the interaction between the categorical variables (BC). I am trying to predict a continuous variable (Y). The formula ...
I am working with a substantial dataset in which I need to compare the distributions of certain common features across different categories. The challenge I face is that due to the imprecision in classification criteria, it often leads to the rejection of the null hypothesis in standard hypothesis tests, even though I ...
I have 6 temperature sensors (columns) located at different places. Each one offers a measurement each hour. I have $168$ measurements (rows). I am working on python and I have already used the function numpy.corrcoeff(my_data) to obtain the correlation of the whole time series (a $6\times 6$ matrix). I want to calcula...
I want to show that $\hat{\beta}$ is identical,no matter if I do a multivariate regression or the partialling out approach. Therefore consider the following partialling out approach (without constant!): Step 1: $x_{ik} = x_{i2}' * α + v_{ik}$ Step 2: $y_i = v_{ik}' * β + u_{ik}$ My starting point is the following: $\ha...
PCA is a generative model, by which input images or data can be reconstructed. LDA (Linear Discriminant Analysis) is a discriminative model, which extracts better features for classification. How to make subspace learning that fulfils both aspects or at least balance between the two aspects ? Mathematically formulate t...
Cinelli et al., 2022 and Wysnocki et al., 2022 describe in technical terms how controlling for a collider can lead to biased estimates. If one needs to explain why one should not control for a collider to a non-technical audience of lay-people without a stats background, what would be an intuitive explanation?
the dataset is split into 3 categories: train, test, valid. after training the error rates we see have these values. case 1 1% error on the training set. 5% error on training dev set. 5% error on the dev set. the model is underfit as it should show less or same error rate btw valid ~ test dataset case 2 11% error on...
Consider the following (simplified) example of a project I am working on: I assume that $X$ has a linear effect on $Y$. However, after plotting the relationship on a scatter plot, it looks like the relationship between $X$ and $Y$ is curvilinear. In particular, the lower and higher levels of $X$ are correlated with low...
Using time-series data, I'm trying to determine the optimal polynomial degree to use for my regression. To do this, I chose to run an ANOVA test on 5 models, the first model's degree is equal to 1 and each successive model's degree increases by 1. So, model 3's degree is equal to 3 and model 5's degree is equal to 5. I...
I'm running a ML algorithm on some data, and I noticed that if I change the random state inside the train_test_split function, accuracy score change in a quite wide range. For example, with random state = 4, I reach an accuarcy score range that may vary from 0.78 to 0.8 (it depends by the seed in the algorithm). By usi...
I would like to exchange with you about how to best do this. Let me try to clearly describe the situation in the most non-verbose way I can! (Stack: Python, Darts (from unit8), pandas, numpy) I have a building temperature time series, I perform regression on it. Using Darts it is pretty easy to use covariates (both cat...
Here is the application: I have a spectrometer and I need to test different lighting setups for it. Each time, I illuminate a fixed set of 9 color references, and I measure them. The spectrometer is sensible to 8 wavelengths. Here are the plots with two different configurations: Configuration #1 Configuration #2 ...
A test results interpretation question, which I think boils down to this: what is the distribution of the minima of pairs of values sampled at random from a known distribution (say, Gaussian) and can the parameters of the latter be estimated knowing or estimating the parameters of the former? Suppose that one wants to ...
I'm running a regression on various subsets of data and want to know if the 'b' coefficient has a consistent impact (in terms of size and direction) across these subsets. C1 = a + bX C2 = a + bX .. Cn = a + bX What methods can I use to check this when there could be up to 20 subsamples? Is my current approach fundamen...
I am looking high and low for how to model data where the outcome is pseudo-continuous (change in questionnaire scores) that can be negative and has a lot of "true" zeroes. I see talk about models for zero-inflated count data, i.e. positive integer outcomes like zero-inflated poisson/ZIP, zero-inflated negative binomia...
Let us assume that we draw a sample $\{X_i\}_{i=1}^N$ from a random variable $X$ and we have a discrete probability distribution $q_{ij}$, i.e. $0 \leq q_{ij}\leq 1$ and $\sum_{ij} q_{ij} =1$ (the $q_{ij}$ are unralated with the random variable $X$). I want to study the following figure of merit, more specifically I w...
Restrict the intercept term, i.e. In this case, I want to calculate F-test. The formula is as follows: How can I calculate SSR for restricted version? What is its formula? Thank you.
Cox regression seems useful as a broad strokes model for measuring survival/ churn of a subscription-based product/ account lifetime estimate -- and the broad factors that might influence the survival curve (and area under the curve for estimated lifespan). Unlike typical human survival data however where there's gener...
Let $(X_j)_{j= \mathbb 0}^\infty$ a fixed realization of strictly stationary AR(1) process: $$X_j = 0.9 \,X_{j-1}+ \eta_{j}, \quad (\eta_j) \overset{iid}{\sim} N(0,1)$$ For each $n$, consider $B_n\sim Bernoulli(c/n)$, with $c>0$. Suppose $(X_j)_{j= \mathbb 0}^\infty$ and $(B_n)_{n \in \mathbb N}$ are independent. Defin...
I'm trying to build bootstrap confidence intervals for the predictions of my model, which is a gradient boosted machine. I understand that this is done as follows: Tune and build the "mean" model Sample the training data with replacement Rebuild the model on the sampled data Repeat steps 1-2 N times Predict onto a giv...
I am working with field variables and telemetric variables. The dataset is composed of geographical locations for which i have both types of data. Amongst these field data, some are of interest, to be predicted, while some other are just field characteristics. The initial goal of my study was to model the field variabl...
I have a feeling this is a silly question. I am working on a research paper, at some point in it we perform a likelihood ratio test. The first guess would be to apply Wilks's theorem. However, if we take the hypotheses: $$ H_0: X_i\sim Binom(n1,p1), Y_i\sim Binom(n2,p2) $$ $$ H_1: X_i\sim Binom(n1,p), Y_i\sim Binom(n2,...
Random vector $X$ follows a pairwise Markov property on graph $G=(V,E)$ if for any $(i,j) \notin E$, $X_i$ and $X_j$ are conditionally independent given $X_{V \setminus \{i,j\}}$. My question is, why do we not impose the converse? That is, why do we also not impose that if $X_i$ and $X_j$ are conditionally independent ...
Let $a \sim N(\mu_a,1/\tau)$, and $s = a + \epsilon$, where $\epsilon \sim N(0,1/\eta)$. I know that because both $a$ and $\epsilon$ is normal distribution, s must also be normally distributed with $s \sim N(\mu_a,\dfrac{\tau +\eta}{\tau\eta})$. $s$ is interpreted as a signal to $a$ that is not observed. Then the condi...
I'm interested in the following variant of the usual one-dimensional density-estimation problem: I wish to estimate some unknown density $\rho$. There are iid samples $Y_{1},\ldots,Y_{n} \sim \rho$, but I don't get to see them. Instead, let $\epsilon_{1},\ldots,\epsilon_{n}$ be iid standard Gaussians, let $\sigma_{1},\...
I wrote a classifier that uses LGBMClassifier. This is the code: from lightgbm import LGBMClassifier from sklearn.metrics import accuracy_score from sklearn.model_selection import KFold, train_test_split from sklearn.model_selection import GroupShuffleSplit from skopt import BayesSearchCV DEFAULT_PARAMS = { 'c...
A variable $X_t$ is divided into components $X_{it}$ such that $\sum_i X_{it} = X_t$ for all $t$. Consider regressing each component $X_{it}$ separately on the total $X_t$ to get parameter estimates for the constant $b_{i0}$ and slope $b_{i1}$. Then, we have that $\sum_i b_{i0} =0 $ and $\sum_i b_{i1}=1 $. I don't unde...
I am working through Chapter 13 of the 2nd edition of An Introduction to statistical learning (the R version, see here), on Error Correction. On page 569, in the section discussing the Scheffe method, the authors discuss testing the null hypothesis that the returns from two fund managers, one and three, in a fictional ...
I am kind of a stats noob but I figure someone here may have some insight. I am running a linear mixed effects model in R, reminiscent of what's below: model <- lmer(rating ~ group * cond1 * cond2 + (1|subject) + (1|image), data=data1) I also want to compare the variances of ratings between m...
I have hourly data that has a period of 1 day or 24 hours / time steps and I hope to do short term forecasting for a few days in advance. The ACF of the raw time series was periodic (see last figure) like from this question, so I took a difference between the series and a shifted series by 24 timesteps. The differenced...
I can't understand this cumulative distribution function. I would like to calculate the data distribution function: F(t) := P(X <= t) ~ sum_i freq(observation_i <= t)/total_observation =: f(t) Having the datas: List_Goal: [1, 2, 2, 1, 2] Each of these values (1, 2, 2, 1, 2) is a goal scored by a club in previous matc...
I have two proxy metrics, and I'd like to see which of them correlates more strongly with human ratings. I have ~30 questions, and for each question 3 humans independently give a score on a 1-10 scale. The questions vary in how subjective the scores are, perhaps significantly (in other words, some questions should have...
Background I have a between-subject factor of GROUP with 2 levels (Control and Active) and a within-subject factor of TIME with 3 levels (Time1, Time2, and Time3). Code below to generate some dummy data, # Loading libraries library(tidyverse) # Function to generate mock data for each group generate_data_for_group <- f...
Consider the model $\hat{y}_t = e^{\text{trend} + \text{seasonality}} \prod_k^K x_{k, t}^{b_k}$ where $K$ denotes different investment alternatives. You can think that trend and seasonality are modelled a linear trend and dummies. $0 < b_k < 1$ (to capture diminishing marginal returns) We can linearize the multiplicati...
I have a set of data including information of age groups, education level, and meteorological data from 2000 to 2006. The dataset was spilt by age groups(65-74,75-84,85+),education level(university or above, other), weather (summer, winter), and run the following regression: Death ~ Temp_lag3 + NO3 + rainfall + relativ...
I’m trying to figure out the math behind the formula for the variance of the T-stat in Cochran-Armitage trend test show in Wikipedia. It says that decomposition is used, however I can’t work this out. Any insights or resources would be greatly appreciated!
Here it the link to the GitHub Repository for this project. I am going to preface my question by saying that this problem of interpretation I have run into is in the context of me doing my part as a collaborator on a paper for publication for the first time, and I waited a while before coming here to ask for help on th...
I have a Bayesian inference problem where the likelihood function is conditioned on two unknown variances. $$\log\mathcal{L}(d\mid \sigma_n,\sigma_s) = -\frac{1}{2} \log (\sigma_n^2 + \sigma_s^2) -\frac{1}{2}\frac{(d-\mu)}{\sigma_n^2 + \sigma_s^2}^2$$ where $\mu$ is a known quantity. I would like to find a conjugate pr...
Lets say i have the decompositions of a financial result into 21 portfolios and 11 asset classes below. I can decompose the result into either portfolios or asset classes easily by using a waterfall chart (which my bosses really love), but I am looking for something, hopefully similar, which can decompose both dimensio...
I have two distributions $p_a$ and $p_b$ and I want to sample from $p_c$, defined via the log density $$ \log p_c(x) = (1+w) \log p_a(x) - w \log p_b(x) $$ or via the desnity $$ p_c(x) = \frac{ p_a(x)^{1+w} }{p_b(x)^w} $$ I am a noob when it comes to sampling from a distribution, so any pointers would be welcome. Is th...
I currently have data from $n$ sources. Each source sends a binary signal each minute. I have a register of $p$ minutes. I have used Python to calculate the Jaccard indices of each signal as from sklearn.metrics import jaccard_score #... for i in range(num_bin_sensors): for j in range(nnum_bin_sensorss): ...
I have price Data for a set of items for various time steps as i collect this data regularly. The data is very large (over 250000 items usualy per group per point in time) and not normaly dstributed but slightly right skwed. Sometimes the item count drops for certain timepoints and groiups and i want to calculate if i ...
I am interested in using the {PanelMatch} package for a project that I am working on where the conventional matching/weighting framework is expanded to account for the complexities of the panel data setting. Both within the reference manual and their associated paper, the authors rely on research questions with a conti...
I need to assess the relative impact of my coefficients. I work with R and for my OLS model I am using the lm.beta package. However, it does not work with fixed effects models for panel data. Could you recommend an alternative?
If I wanted to find the busiest hour at an ice cream shop and I had the counts of the type of ice cream sold per hour per day. Could I use Poisson regression to find the busiest hour and month etc for the shop? Or would it only work if I had a unique identifier for each individual, and looked at it at an individual lev...
In my experiment, subjects had to answer a number of unrelated questions before and after an intervention. We had two different interventions, and all participants underwent both interventions in separate sessions. So in each session, there is a pre and post intervention score for each question. For each question, I wa...
I have a table like this: Mutation_2_Present Mutation_2_Absent Mutation_1_Present 982 740181 Mutation_1_Absent 111555 89355602 And I apply the Fisher test etc. The thing is that mutation 1 and 2 are not from gene A vs gene B. They just corresponds to category1 ...
I'm studying linear regression in a Coursera course. The author uses the following loss function in his examples: And he shows the following error surface when he explains the gradient descent. In this last picture, it seems that the cost function has negative values. However, mathematically, the loss function used b...
does anyone know a suitable alternative to Poisson regression if the independence assumption is invalid? Thanks A hypothetical example - if two cars crash into each other and they go to the same mechanic to get fixed. If the mechanic was modelling type of repairs and road conditions. Surely this makes the independence ...
In the paper for strong screening rules for the lasso (link), the following screening algorithm is proposed (start of chapter 7): Let $S(\lambda)$ be the strong rule set. Then the following strategy is adopted: Set $\mathcal{E} = S(\lambda)$. Solve the problem at value $\lambda$ using only the predictors in $\mathcal{...
Do exact matching variables need to be included when estimating effects after matching with the MatchIt package? Take the following example (adapted from the MatchIt vignette on estimating effects after matching): library(MatchIt) library(marginaleffects) # Generate toy dataset gen_X <- function(n) { X <- matrix(rno...
I am trying to estimate the variance $\varepsilon^2_X$ in a simple logit-normal model of the form $ \sigma^{-1}(U) \sim \mathcal{N}(\mu_U, \varepsilon^2_U)$ $ \sigma^{-1}(X) \sim \mathcal{N}(\sigma^{-1}(U), \varepsilon^2_X)$ where $\sigma^{-1}$ is the logit function and both variables $U$ and $X$ are observed. (I am ...
Assume that you have a matrix $X \in \Re^{M x N}$ that have $M$ rows and $N$ columns. The rows $M$ can vary in length, but the $N$ columns remains constant. Each row is labeled with a class ID. The data is 8-bit in this case. The data looks like this. Notice that there are three data rows that have the same value. The ...
Hello to everyone in this community. I am feeling like fish out of water writing in this community, but I know that I am at the right place. Currently, I am conducting a research to assess the impact of Environmental, Social, and Governance factors on Return on Assets of the companies that are listed on London Stock Ex...
I have constructed a structural equation model in R using lavaan, with 2 exogenous predictor variables, 3 mediators, and 1 endogenous response variable: I tried to label it as conventionally as possible but apologies if I didn't do a good job. I am now trying to calculate indirect effects, using past answers on how to...
I'm having trouble drawing conclusions from a specific semi supervised machine learning setting. My use case would be using mixup [Zhang2017] and label guessing similar to the mixmatch paper [Berthelot2019]. That being said, lets say my training data would be split in two sets $T_1,T_2$, for which I have labels for $T_...
My experiment is based on an online ab test system. A typical situation is that, I generate some candidates by some optimizer (CEM, GP etc) and push them to different experiment buckets (around 10). After one day, I will get a daily ab test report for previous day. This will be my evaluated result for these candidates ...
I am trying to correct a variable from a survey that has measurement error. To do this, I have been taking this column as if it was missing and imputing new values based on the predictions of an XGBoost model that is trained with other surveys from different years and that have common variables. I did this using R-Stu...
I need to quantify the relative error of a process that computes the volume of some objects. I also have a sample ($n=400$) of objects that are known to be made of a homogeneous material. Since the density is fixed and known, I figured one could estimate the CI of the density to conclude bounds for the relative error o...
I see the question of model selection for GEE come up and answers seem to usually involve QIC/MLIC for non-nested models, or LRT for nested. That's all fine, but when I have 50 predictors it's a bit tedious to write all 50-factorial model statements. Some have floated stepwise selection using QIC/MLIC but my understand...
My homework problem is: Let $x_1,...,x_n$ be random samples from an $Exp(\lambda)$ distribution. Assume that the prior on $\lambda$ is $\Gamma(a,b)$. a) Find the posterior distribution for $\lambda$. Prior: $\frac{b^a}{\Gamma(a)}\lambda^{a-1}e^{-b\lambda}$ Likelihood: $\lambda e^{-\lambda x}$ $\pi(\lambda|x)\propto \pi...
I have some parameters that I would like to analyze with a two-way ANOVA. The treatment groups have unequal sample sizes (n=9, n=36, n=36, n=36) and the data do not fulfill the requirement of normal residuals due to several outliers (data transformation therefore doesn't work either). Is robust ANOVA like WRS2/t2way ro...
Consider a GLMM setting. Let $i=1,...,m$ denote cluster. Let $l_i(y_i|x_i,b_i;\beta)$ denote the log-likelihood (viewed as a function of the parameters) for each cluster $i$, which includes notably conditioning on random intercept $b_i$. Let $f(b_i;\sigma^2) \sim N(0,\sigma^2)$ for all clusters $i$. Thus, the observed ...


I have my data + data from colleagues who measured independently. I have to create an ICC between my results and theirs. But the only problem is that even if I got some ICC results plus 95% CI, I don't quite know how to interpret it correctly. 
I was comparing the mean values from the measurements for each batch sepa...
I am attempting to conduct a regression discontinuity analysis in Python and I'm struggling with understanding the results. I don't pretend to be a statistician and I'm hoping you helpful experts can lend me a hand. Perhaps I'm not even using the correct testing framework. Context: I have an app that I want to determin...
I'm currently training a neural network using var1, var2, and var3 as input features, with var0 as the target variable. The initial training showed promising results, as the predicted_var0 closely matched var0, creating a nearly 1:1 plot. However, it is challenging when I attempted to use var1, var2, and var0 as featur...
I am trying to train a text classifier with open-source data to generalize on the real user traffic (henceforth "real data"). However, even though I have many annotated open-source data, I have only a few hundred real data. I know the best way to generalize to the user traffic is by training a model with such data. How...
I am doing a study looking at how bacterial communities on eggshells correlate with species-site and nest stage. We sampled the eggshell bacteria at two sites, with two different host species sampled at one of those sites. As such, I have been analyzing the data with a combined species-site 3-level factor. Some of the ...
The Python statsforecast package has some recommendations when simulating / generating time series, that we can add a constant to avoid computational problems: https://github.com/Nixtla/statsforecast/blob/main/experiments/ray_ets/experiment.py Basically, they just do this: # the target variable for univariate forecast ...
I would like to understand the difference between simple R², predicted R², and adjusted R². I have done several research and readings, but the difference is still not clear to me. I have even reached some conclusions, but I'm not sure about my understanding. R² is a metric that ranges from 0 to 1 and measures how much ...
I'm trying to create multiple observations per model from my test set so that I have enough model results to run statistical tests of significance for differences across the models. The models I'm comparing are different types, such as random forest, logistic regression, etc. To do so, I was going to create folds in my...
Let's say that we have a time series: $$\{y_i\}_{i=0}^{n-1}, y_i \in \mathcal{Y} \subseteq \mathbb{R}^m, m \in \mathbb{N}_1$$ that we would like to model with some sort of state-space model: $$x_i = f(x_{i-1}, i) + \nu_i$$ $$y_i = g(x_i, i) + \epsilon_i$$ where $\nu_i$ and $\epsilon_i$ are (i.i.d?) noise terms. In prac...
I am looking for an example of an outlier in three dimensions but that cannot be detected with the three scatters xy, xz, yz. Can anybody help me? Thanks in advance.
I was just asked to familiarize myself with some methods looking at comparing AUROC for a few predictive scores to predict outcomes. Issue is that I have a dataset of about 200 with <5% with the outcome of interest. Given this low event rate is there any issues I should be aware of (or corrections to apply if they exis...
It seems that if a one-sided Z-test returns a p-value $>1 - \alpha$, you have enough evidence of absence to reject the alternative hypothesis in favor of the null hypothesis, because if you were to swap the null and alternative hypotheses and repeat the test, that p-value would be $1 - $ the original, and hence $<\alph...
What is the probability of any child getting two or more candies? My thinking is that if there is one child getting 2 candies, that means there is one child not getting any candies. So $(n-1/n)^n$ would be the answer. But for $n = 2$, the distribution is 1 1 0 2 2 0 which means $(n-1/n)^n$ is not correct. Can someone ...
I also posted the question at https://math.stackexchange.com/questions/4793565/how-to-evaluate-the-validity-of-my-teaching-methods-through-analyzing-the-data-o Problems I want to solve I want to be a high school teacher, and I have some self-considered great ideas of teaching methods. Before that, I want to be a tuto...