instruction
stringlengths
9
38.7k
Let $X_i$ be an iid sample from $X\sim N(\mu,\sigma^2)$. I try to find the generalized likelihood ratio test of $H_0: \sigma^2=\sigma_0^2$ v.s. $H_1: \sigma^2\neq \sigma_0^2$ with $\mu$ unknown. My work: I try to find the likelihood ratio statistic: \begin{align} \lambda(x) &= \frac{\sup_{\theta=\theta_0}L(\theta\mid ...
I have run a Kruskal Wallis test in my dataset and have a significant overall result (p<<0.001). However, since the medians for my categories are the same, I can't work out the direction of the trends. Post hoc tests have revealed which groups are different, but I'm not sure how to work which groups are affected more b...
I'm running a bayesian paired t-test using JASP. In the software, it says that one of the assumptions is that "The difference scores are normally distributed in the population". I'm a little confused as to why this is true since the prior is a Cauchy distribution, not normal. Please let me know if you know why! Thanks!...
If we have a dataset $D := f(x_i, y_i)^n_{i=1}$ where $x_i = [x_{i_1}, x_{i_2}, ... , x_{i_p}]^T$ is a p-dimensional predictor and $y_i \in R$ is the response to $x_i$. Now, shall we select as our parameter vector   $\beta = [\beta_1, ... , \beta_p]$ and choose our model to be $\hat{y}_i =  \beta^Tx_i$ or select as ou...
I measured changes in the appearance of chronic wounds. There are four levels of this variable that can be ordered from the worst to best as necrotic < sloughy < granulating < epithelialising. There are proportions of the set of patients with corresponding levels such as: The wounds were measured at the baseline on wh...
I need to analyse one dataset composed of two experiments. The goal is to identify sick individuals (animals) based on different parameters. These parameters have been collected on different farms (one time per farm), during two data recollection campaigns. I have very limited information on one of the campaign, and I ...
Given the constants $\{a,b,c,d,e,f$}, I want to compute the conditional mean $\text{E}[Z|S_1,S_2]$ and the conditional variance $\text{Var}[Z|S_1,S_2]$, with: $Z=a+bX_1+cX_2+dY_1+eY_2+fY_3$ Is the following true? $\text{E}[Z|S_1,S_2]=a+b\text{E}[X_1|S_1,S_2]+c\text{E}[X_2|S_1,S_2]$ and $\text{Var}[Z|S_1,S_2]=b^2\text{V...
I am considering the model: $$ y_t = \beta_0\left(\Pi_{i=0}^{K}x_{i,t}^{\beta_i}\right)\left(\Pi_{j = K+1}^{L}e^{\beta_{j}x_{j,t}}\right) $$ where we want to have multiplicative effect between variables and linear for the others. My question is the following: in this model, how can we interprate and estimate the coeffi...
Say I have a set of measurement values $y_\text{m} = (y_{\text{m},1}, \dots y_{\text{m},N}) $, and compare these with some ground truth $y = (y_1, \dots y_N)$. Then, if I understood correctly, I can estimate the (sample) variance of the error $(y_\text{m} - y)$ in my measurement values as \begin{equation} \sigma^2 = \f...
If I were estimating the treatment effect in a linear regression model. Assuming there isn't a risk of collider bias and multicollinearity, would it be acceptable to add in as many covariates as possible to control for the remaining variation unexplained by the treatment effect variable? Or would the risk of including ...
Can anyone explain me about how sample size selection happens which is generally used as $20\times (p+q)$? Here $p$ is the number of parameters in the final model and $q $ is the number of parameters that may have been examined but discarded along the way. Any credible reference is appreciated.
Below you can view the univariate sales dataset for a particular product with x3 promotional interventions/campaigns (highlighted in grey and green); each promotion campaign stretched for a length of 14 days. My main objective is to eventually measure the post-period uplift of all 3 campaigns separately, but to keep co...
I am a bit lost on the correct approach to this Statistical problem. Let me explain the context of this problem: I have a cohort population with longitudinal measurements during a period of several years and in this population, a subsample of its, has been wearing an accelerometer to measure Physical Activity (consider...
I wonder if anyone can help me to decide what steps to undertake in making a mixed-effects model in R. My data consists of 5 treatments of which the effects are being measured in 10 consecutive time points. All subjects (20) receive 4 of the 5 possible treatments in a block-randomized fashion. I want to construct a mod...
I have been taught that if an estimator is unbiased, then its convergence in probability can be proven by taking the limit of its variance as the sample size grows to infinity and showing it is equal to 0. However, considering the definition of the variance and the fact the estimator is unbiased, this would also prove ...
The context is about the use of a given model deviance (often referred to as “Residual deviance” in R) and that of its “Null deviance” to calculate D2, the deviance explained for models with non-normal error. This metric (D2) is somehow an approximation of what a coefficient of determination (R2) is for a linear model,...
Sometimes, in a meta-analysis, it happens that studies include more than one independent sample and multiple component outcomes are reported for each sample. Which model would be more reasonable to use, three-level or four-level meta-analysis? I have read the two nice papers “Three-level meta-analysis of dependent effe...
Is it possible to include mixed effects into a random forest model in R? I know about the lmer (from lme4) and randomForest (from randomForest) functions but it would be nice if I could combine the two in some way, if that makes sense. I'm afraid that if I don't include random effects in my random forest model, it will...
The wilcox.test function in R calculates the pseudomedian and a confidence interval when conf.int=TRUE. In this question, Wilcoxon signed rank test - help on interpretation of pseudo median for example, there is a description about the calculation of the pseudomedian, but I don't understand why the confidence interval ...
I have been tasked with evaluating hospital length of stay (LOS) in two groups of patients using the Cox proportional hazards model. One group of patients received a medication, the other did not. Hospital discharge constitutes a failure, there is no censoring (all patients are eventually discharged). The hazards for t...
During the fine-tunning of a DistilBert model, I tried two optimizers (with different parameter sets) on the same dataset. Here are the results: - AdamW: train loss (0.21), val loss (0.33), accuracy (0.88) - SGD: train loss (0.35), val loss (0.35), accuracy (0.87) I read that if: - train loss > val loss: the model is ...
Binary cross entropy is normally used in situations where the "true" result or label is one of two values (hence "binary"), typically encoded as 0 and 1. However, the documentation for PyTorch's binary_cross_entropy function has the following: target (Tensor) – Tensor of the same shape as input with values between 0 a...
I will show what I'm doing it in R to make sure if I'm doing it correctly This is my dataset which I'm using for analysis dput(df2) structure(list(TCGA_ID = c("TCGA-AB-2965", "TCGA-AB-2881", "TCGA-AB-2834", "TCGA-AB-2818", "TCGA-AB-2898", "TCGA-AB-2956", "TCGA-AB-2994", "TCGA-AB-2920", "TCGA-AB-3009", "TCGA-AB-2892"...
Analysts often use Rubin's rule (RR) to obtain a pooled estimate of a popular quantity from multiple (imputed) datasets. While popular statistical software (such as the R survey package or Stata's mi) will apply RR to any set of inputs, this may lead to invalid inferences when the underlying assumptions are violated. F...
This answer gives an answer for discrete distributions referencing Halmos (1946). However, I am looking for a more general result. For this, the references provided in the previous answer only dealt with creating non-negative estimators from already existing unbiased estimators. Bickel and Lehmann (1969) give a charact...
I am to analyze a set of economic variables, taken from multiple countries, and recorded across time. This is certainly a panel dataset. If I'm not mistaken, the pooled OLS, fixed and random effects models are linear while polynomial regression models seem to focus on a single variable Is there such a thing as a poly...
I am analyzing count data (number of negative mental health symptoms). I ran a 1 sample KS test in SPSS and the sig is <0.001 for both a Poisson distribution and a normal distrubtion - indicating that the data does not follow either. There are no zero values whatsoever (values range from 1-9). What other options do I h...
I have some doubts about how to recognize if there are extreme weights after balancing my population with inverse probability treatment weighting. For instance, let's look at these results [code at the end of the post] - I know that age is not perfectly balanced but it doesn't matter as it is just an example: M.0.Adj ...
I have a set of 5000 samples with 24 features, and I'm runing a Gridsearch using scikit-learn to find optimal values for C, epsilon and gamma in SVR. In total I'm testing 90 different hyperparameter configurations with 5 fold cross validation. Also I included verbose = 10 to get feedback on whats happening. For the fir...
Given a type 1 ANOVA where both factors are fixed and with equal cell numbers, how do I mathematically formulate the $H_0$ testing for interaction effect? Let's say I have 3 levels of Factor A (rows) and 3 columns of factor B (columns). I denote my interaction term in my model as $\gamma$ This is my take on my question...
I am stuck in the diagnostics of my model, and I am looking for advice on what to do. My data frame goes like this $ ID : Factor w/ 15 levels "Buzinza","Kabukojo",..: 1 1 1 1 1 1 1 1 1 1 ... $ Period : Factor w/ 3 levels "After","Before",..: 1 3 1 1 2 1 1 2 3 1 ... $ Class : Factor w/ 3 levels "Adult female"...
Let's say we have two Heckman selection models. Can we correlate the residuals from the their outcome parts (since they might have different lengths)? If yes, how?
I am estimating the population mean of the 2023 value of cars from a stratified sample. The value of the cars is right skewed on visual inspection, and some basic diagnostics indicate normality assumptions are violated. I need to calculate the 95%CI of the calculated population mean. My first thought was to use acceler...
I have multiple discrete time Markov processes. They each consist of the same 12 categorical states. I want to model how the probability of each of these states varies over time across each process. To do this, I fit a multinomial logistic regression model with this formula: State t+1 ~ State t + Time My data is organi...
I have an interesting medical problem where the price of failure and offset between precision and recall is much much higher than typical ml systems I’ve worked with before. The precision of one class needs to be so high that we actually measure it in false positives per day, which should be 0.01 or less. In terms of p...
In Minitab, we can obtain the sample size/power result with only the maximum difference between the group means instead of ALL the group means.(As seen in the picture below.) How is this done? What are the formulas for the calculation of the sum of squares? Also, I guess R shall also do this. However, it seems that fun...
I have a list of students from different classes, so far I have used a linear regression to create predicted future test scores based on multiple criteria such as attendance, previous test scores etc. I would now like to use these predicted scores to work out the probability of each student finishing 1st, 2nd, 3rd in ...
So I'm trying to use Weighted Binary Cross Entropy Function. I'm trying to calculate the weights for each class. I have 14 of them them in the target variable. I'm using the following function for calculating the weights. def compute_class_freqs(labels): """ Args: labels (np.array): matrix of labels, si...
I want to test a claim that the population probability is at least 0.9 and Im confused about how I should set my alternative hypothesis. Should it be H0 : p=0.9 vs H1: p<0.9 or H0: p=0.9 vs H1: p>0.9 ?
I am studying this source about One-Way ANOVA Test in R. We know that ANOVA test assumes that the data is normally distributed and the variance across groups are homogeneous. In the source the claim that we can check this with some diagnostic plots. At the part Check the homogeneity of variance assumption, the say that...
I have fitted two robust linear mixed effects models, null.model and full.model, with same random-effects term, (1 | id), to a data set using robustlmm::rlmer. These models only differ by a predictor x: null.model <- rlmer(y ~ (1 | id), data) full.model <- rlmer(y ~ x + (1 | id), data) I have chosen to fit robust LMMs...
I'm following this note to learn about deriving an upper bound of the UCB algorithm on the Stochastic Multi-Armed Bandit Problem. In particular, the proof of Lemma 15.6 there connotes that we can apply Hoeffding's inequality to $$ Pr(\frac{1}{N_{t,a}}\sum_{s=1}^t Z_{s,a} I_{A_s=a} - \mu_a \geq \epsilon ) $$ where $Z_{s...
I am asked in a homework question to prove asymptotic normality for the generalized method of moments estimator. The assumptions (which i think are necessary to solve this particular subproblem) given in the theorem are $ (Z_i)_{i \in \mathbb{N}}$ is a sequence of i.i.d. random variables. $g(z|\theta)$ is continuously...
I had planned to perform a 3 x 2 repeated measures ANOVA before I realized that all the variables are distributed in a bimodal, U-shaped distribution where 0 and 1 are the modes. The high occurrence of 0 and 1 are meaningful to the analysis and therefore it may be inappropriate to transform the data. Why is the variabl...
I am training an LSTM where I have sales data from 20 different individuals over the past 10 years. Now, I read this brilliant answer: How to train LSTM model on multiple time series data? But, due to domain knowledge / prior analysis, I believe that only “recent” timesteps are useful in predicting a future timestep, l...
The formulation of the conditional density is: $$ f_{Y|X}(y|x) = \frac{f_{X,Y}(x,y)}{f_X(x)}. $$ I need to estimate this density from data and it's prohibitively time-consuming to calculate the joint density (I have 10s of variables). However, for fixed values of x, it is easy to estimate directly the conditional densi...
Experts, I fitted a GAM Model with mgcv package containing a significant independent variable: number of days since first Action. Max.number of days were 40 days. Dependant variable is Action of frogs.Question is Do you recommend gam.predict or time series function for predicting action patterns of frogs.Thanks a lot f...
Is there a theoretical upper limit to the number of parameters that be estimated with maximum likelihood estimation? My understanding is no, but that if you have too many parameters it may not be possible to find one set of parameters that uniquely optimizes the log-likelihood. Assuming the above is correct, practicall...
I want to run robustness tests for my model. For example, by reducing the sample to heavily concentrated groups, running a different regression (probit etc) etc. But, how do I ascertain that my results are robust? Is it sufficient that my key explanatory variables have same sign as the original model, magnitude of coef...
Some background on my problem - Let us consider a discrete memoryless channel (DMC) $W_{Y|X}$ from Alice to Bob. A DMC is a conditional probability distribution over the random variable $Y$ given input random variable $X$. We wish to send a uniformly randomly chosen message from a set of size $\mathcal{M}$ over this ch...
I'm struggling a bit with intuition behind resampling tests for difference in means. I've two samples s1 and s2 of size n1 and n2 respectively. Population parameters are unknown. I'd like to know if the means of the two populations from which the samples came are different. The Permutation approach for this I've read t...
I am trying to simulate data coming from a joint model of longitudinal and survival data. Basically, my thought process is this. I need to define a maximum follow-up time, F. I need to define coefficients ($\boldsymbol{\beta}$, $\sigma_t$,generate X from some distribution, W from some distributions and define $\alpha$...
I am currently working with a MLR model comprising 1 numeric/continuous predictor variable (x1), several nominal categorical variables (x2 ... xi), and an interaction term between the continuous variable and one of the categorical variables (x1*x2). I wish to plot the relationship between y and x1 on a 2d scatterplot (...
Suppose I have model $M$ generating data $Y=\beta_0+\beta_1X+\beta_2Z+\beta_3W$ with all $\beta$'s known. Instead of using model $M$, I used misspecified models $M':Y=\beta'_0+\beta'_1X+\beta'_2Z$, $M'':Y=\beta'_0+\beta'_1X+\beta'_3W$ and went on testing hypothesis $H_0:\beta'_1=0$ vs $H_1:\beta'_1\neq 0$ with level $\...
Say i have a dataset with groups that i want to use for a Regression problem that looks like the following where feature1 is the group column: idx: [0,1,2,3,4,5] feature1: [1,1,2,2,3,3] feature2: [6,7,8,9,4,5] target: [9,8,4,3,2,6] How do i split this properly without any data leakage? Ive read that you need...
I am struggling to understand a certain inequality based on the regression $L_2$-error of a regression function estimate. The setting is that of random forests for regression. Let $\Theta = \{ \Theta_{1}, \dots, \Theta_{M} \}$ be the (iid) random variables that capture the randomness that goes into contructing the ind...
Let’s assume I am simulating data under a given model, and using MCMC with said data to estimate a (known) model parameter. Let’s assume I do this thousands of times. The results I obtain show that the median of the posterior distribution for this parameter is always smaller than the true value, yet the 95% highest pos...
I'm trying to derive the influence function of the estimand $\Psi$ $$\Psi(P) = P(Y > y | X = x)$$ Following tutorials for deriving the influence function of the average treatment effect here. Has anyone seen this derived anywhere?
I am conducting a meta-analysis with a skewed distribution. To address this issue, I transformed the "marker" data into a log-scale, "ln marker". I obtained the (geometric) mean and standard deviation of ln marker from one article. My goal is to find the 95% CI of ln marker. To do this, I transformed the geometric mean...
I am working with a bunch of different GAMs with predictor land cover and remote sensing variables derived at different scales and comparing models within scale. I am not interested in spatial and temporal autocorrelation as an explanatory variable in my model, but it does need to be accounted for (checked with Moran's...
In a book about Biostatistics, I found this example to calculate expected value: Consider the following hypothetical example of a lung cancer study in which all patients start in phase 1, transition into phase 2, and die at the end of phase 2. Unfortunately, but inevitably, all people die. Biostatistics is often conce...
I understand that the x-intercept can be calculated using $y = mx + b$ for a linear model. I am unsure if this is statistically appropriate for a mixed model with count data, given that counts cannot be negative and there are random effects to consider. I have seen examples of x-intercept calculations for count data wi...
Based on a data set I found a sensitivity (.82) and specificity (.88) for a diagnostic test bases on a n=257 sample. However, I wonder whether I can generalize these numbers. I thought this was very much the same question as inferring a succes rate in a binary proces (k successes in n trials) using a binomial distribut...
Does $P(B|A) = 0$ with $P(A) \neq 0$ mean $A \cap B = \varnothing$? I think I already have an answer, but I'm not sure it's correct. I would say no, because we can consider a variable $X \sim U(0,1)$, described by a continuous uniform distribution, where, for example, $A$ is "$0.2 \leq X \leq 0.9$" and $B$ is "$X = 0.5...
I'm trying to prove that the 2nd order polynomial kernel, $K(x_i, x_j) = (x_i^Tx_j + 1)^2$ is a valid kernel which satisfies the following conditions: K is symmetric, that is, $K(x_i, x_j) = K(x_j, x_i)$. K is positive semi-definite, that is, $\forall v \space\space v^TKv \geq 0.$ We can actually prove that second-o...
I'm looking at 4 pairs of independent variables and one dependent variable. The correlation analyses revealed no significant correlation, although it was positive, between all independent variables and the dependent variable. Is it bad that my correlation coefficients were not significant? The regression analyses revea...
I will be administering an early literacy assessment to preschoolers at 2 time points in the preschool year. I want to be able to examine the growth from point A to point B. I also wanted to administer a social emotional assessment at the two time points and asses for growth as well. Lastly, I wanted to examine correla...
I have merged data to create an event study for the treated population. This treatment happens in 4 batches for some university students in certain cohorts (when they turn 19 in 2005 and are at university when the treatment commenced - thus are treated. But this treatment doesn’t happen for a majority of students and f...
The Bonferroni correction seems to be quite controversial. But I read again and again that it should be used for multiple tests. But what exactly are multiple tests? If I have three different data sets in the same study and run only one t-test on each data set, is that a multiple test and do I have to apply a Bonferron...
I'm new to probability theory. Let's say that I have the following situation: Three identical boxes have different collections of doughnuts in them. The box on the left ($L$) has 2 plain ($p$) doughnuts, 3 maple ($m$) doughnuts, and 5 chocolate ($c$) doughnuts. The box in the middle ($M$) has 2 plain doughnuts, 3 maple...
My dataset consists of temperature measurements from thermocouples as shown in the figure. I use several models like Long Short-Term Memory (LSTM) and GRU in order to predict future values of these thermocouples. Only past measurements of the thermocouples are taken into consideration in my model, no other variables. M...
I need to test the relationship between 3 variables. The problem is, one variable is ordinal and the other two are nominal (more precisely, both are from a dichotomous scale). I have already looked for this, but it seems to me that there is no suitable type of analysis. The best way currently seems to me to use a logis...
In a simple neural network, having more nodes on an input layer that on the next layer performs a compression or dimension reduction similar to what PCA does. The fewer nodes encode in a combination some kind of information that is in the previous layer. While the forward computation is structurally similar to PCA , th...
Say I'm running Metropolis-Hastings with target density $p$. What I would like to do is divide the space $E$, on which $p$ is defined, into a disjoint union $E=\bigcup_iE_i$ and run a separate instance of Metropolis-Hastings inside each stratum $E_i$ (for example, since I can come up with a proposal kernel specifically...
Say I want the probability of at least 1 event occurring out of a series of n events each with differing but known probabilities from observing past behavior p_0, p_1, ... p_n. Generally, if I assume all of these events are independent, I can get that for some share of the events via 1 - the product of all (1 - p_i) in...
I am struggling to interpret the location parameters in generalised partial credit models. Say you have location parameters $a_1$,$a_2$ and $a_3$. My professor said that for the item to be accepted then they must be monotonic i.e. $a_1$<$a_2$<$a_3$ which I think has to do with the monotonicity assumption of such models...
Let’s assume there is a variable $z$ that can be modeled as: $$z=f(x)+g(y)+ε$$ Where $f$ and $g$ are unknown functions greater than zero, $x$ and $y$ are independent variables and $ε$ is random noise. $y$ is totally unknown, but I have data pairs $(x,z)$ and I’m trying to identify the $x$ value at which $z$ is “conside...
I have a question about bootstrapping correlated values from grouped data. The context is using Census data grouped by region, $R$ (tract or block group). Each region has a list of estimated values $V$: median income, population in poverty, age 18 to 64, etc. Each estimate has a margin of error, $MOE$. This $MOE$ is...
I am currently doing the statistical analysis for my master thesis. In my experiment, I have 3 species that I expose to Erosion treatments. After every treatment, I see what percentage of each species fall under one of 11 damage categories as can be seen in the picture: I collected how big the angle compared to standi...
Edvard, the evaluator in sample B, does not know Richard, the target subject in sample A. However, the two, independently, give the same answer/Likert value (1-5) to 30% of the questionnaire items. It results in an artificial inflation of the correlation between the evaluations. How can I reduce it?
I've been trying to learn how to do this analysis but I can't find any information that sheds light on my case and I can't figure out what to do from Hayes' book. I would really appreciate it if someone could help me out. For my undergraduate thesis, I'm examining how emotion regulation predicts resilience and whether ...
I've been told that these following acf graphics basically shows that both series are stationary, but i didn't really understand why. Is it if both autocorrelation and partial autocorrelation can gradually decay to 0 then the series is stationary? Or it's a lot more complicate than this..?
I am trying to implement the Schwartz-Smith (2000) commodity pricing model from the paper Short-term variations and long-term dynamics in commodity prices The model is estimated using the Kalman Filter, where the state space is described by the following two equations: xt = c + Gxt-1 + $\omega$t yt = dt + Ftxt + vt, w...
I have a fairly elaborate Directed Acyclic Graph (DAG) for the analysis that I am running, but I am presenting a simplified example here to clarify a few things. Here is a DAG from dagitty.net: According to the graph, I only need to adjust for A in order to close the back door path and to identify the total causal ef...
I am iteratively solving a stochastic equation by generating a random field and using the resulting generation to move toward an equilibrium. I know that the system converges but I want to use an appropriate stopping criteria. At equilibrium, I know that if I continue to iterate, the mean change over many iterations wi...
I am using bootstrapping to calculate confidence intervals for a risk ratio. In some of the bootstrapped samples, there are no observations of one of the outcomes, leading to the risk ratio being value / 0. Thus, when I try to calculate the SE, I get a NaN value in R, and thus an Inf upper CI. How should I calculate th...
I'm trying to adjust a Generalized Additive Model to a daily time series. My goal is to do a short-term forecast for the gas demand of my city. I have data since 2015, including information about the weather (minimum and maximum temperatures). The data with which I'm working is daily data, and since I have information ...
The leaps library regsubset function gives an object that contains the list of BIC drops of each subset model from the intercept model. However, it is different from what is calculated manually. For example, using the mtcars dataset Reproducible code: library(leaps) # Stepwise selection stepwise = regsubsets(mpg~., da...
I want to investigate whether there is a significant difference in the centrality of eigenvectors between two groups. The sample sizes of the two groups are over 9000 and 300, respectively, with a large difference. I used the Mann-Whitney U non-parametric test, and I want to know whether the result of the non-parametri...
The setting is $A\in \mathbb{R}^{n*n}$ with each entry being i.i.d. bounded r.v. in $[a,b]$. The question is to prove $\Vert A\Vert_2$ is sub-Gaussian. Intuitively I thought since $\{A_{ij}\}_{i,j=1,...,n}$ is bounded, then $$\Vert A \Vert_2 = \sup_{\Vert v \Vert = 1} \vert v^TA^TAv\vert = \sup_{\Vert v \Vert = 1}\vert...
Is it possible to use intention-to-treat principle in randomized studies with crossover design? Was it ever used in such studies?
A previous question indicates that after conducting a permutation ANOVA and finding a significant interaction, permutation tests would be suitable for pairwise comparisons. However, I also saw online tutorials (e.g. this blog post, or an older one from the same author) presenting how to use bootstrapping to obtain cont...
I'm confused about the two different recalculated 95% confidence interval (CI) results from two meta-analyses on the same article. The original article reported a geometric mean of 2.3 and a geometric standard deviation (SD) of 1.60. However, one meta-analysis calculated a 95% CI of 0.76-3.84 using these values, while ...
I red the paper about transformers, and fully understood every single piece of that, so now I'm implementing it from scratch in tensroflow, without using any shipped layer from the library. The only missing part is how they intend to take a single tensor (batch size, time-steps, embeddings) and give it to the multihead...
Let $X_i$ ($i=1,\dots, n$) be a random sample from $X\sim \exp(\lambda_1)$ and $Y_j$ ($j=1,\dots, m$) be a random sample from $Y\sim \exp(\lambda_2)$, and $X$ and $Y$ be independent. I try to find the generalized test of $H_0: \lambda_1=\lambda_2$ v.s. $H_1: \lambda_1\neq \lambda_2$. Find the distribution of the statis...
I am reading this paper and need to replicate what they did in Table 4: However, I am having trouble understanding what are local and global polynomial regressions. Could someone please explain? If you need more context, you can see the link and see page 8, right above Figure 5: "We do this exercise for the six global...
Consider random variables $V_1$, $V_2$, $V_3$, and $V_4$. Then, define $U_2=V_1+V_2$ and $U_3=V_1+V_3$. That is, $U_2$ and $U_3$ are correlated by construction. My first question is whether the following equality can hold: $$ \Pr\left[U_2<V_4\mid V_4,U_3\right] = \Pr\left[U_2<V_4 \mid V_4\right] \tag1 $$ In my personal...
I want to predict the concentration of a biomarker (continuous) according to the interaction of white blood cells with time (both continuous), considering medical units as a random effect that may impact both the intercept and smooth of this interaction. Is the following syntax appropriate? bam0 <- bam(bmk ~ s(unit...
The question of modeling the zero-inflated part of a negative binomial mixed effects model is a thorn in my side. I've read a lot of articles and blogs and it seems to be an issue that is largely glossed over, perhaps due to the fact the choice about the zero-inflated part of the model is very specific to each research...
I am seeking help on how to perform Monte Carlo simulations on (potentially) correlated time series. I have a single product (e.g., men's wallets) that are sold out of seven stores in the same city. I have last year's daily sales of wallets for each store. Most days, a store sold zero, some days they sold one, fewer da...