instruction
stringlengths
9
38.7k
Long story short, I'm seeing in the literature that linear instrumental variables models are identifiable, even in the presence of unobserved confounders. The unobserved confounding aspect befuddles me, since it is not clear where this insight came from. Briefly, given a linear instrumental variables setup where $X = ...
Let us consider a regression model $ y = X_1 \beta_1 + X_2 \beta_2 + u $ where $y$ is $n \times 1$, $X_1$ is $n \times p_1$, $X_2$ is $n \times p_2$. Assume that $rank(X_1)=p_1$ and $rank(X_2)=r_2 \le p_2$. By multiplying $M_1 = I_n - X_1(X_1'X_1)^{-1} X_1'$ to the above model, we have $ M_1y = M_1 X_2 \beta_2 + M_1 u ...
I am going through the backdoor criterion and how we get from an expression involving do to one which doesn't as below. What i don't quite get is how to rewrite this estimand in terms of propensity scores. e.g. imagine we denote this propensity score by e(v2) - i get that the propensity score acts as a mediator betwee...
I just did a MANOVA to investigate the effect of the my IV on my three DV's. However, now I want to see if my Moderator Variable has anything to do with it. Can I just put my MV as a covariates? It then becomes a MANCOVA right? My apologies if this question has been asked, I looked for it but did not find anything that...
I'm interested in the following inference / filtering problem in a hidden Markov model setting. Suppose we have a simple random walk $x_t\in\mathbb{Z}$ and observations are "images" consisting of iid pixels $y_{n,t}$ of the form $$ y_{n,t} \sim \mathcal{N}(\epsilon\delta_{n,x_t},1) $$ where $\delta_{j,k}$ is a Kronecke...
I am facing a problem in Hausdorff and IoU, where they stop learning when reaching a specific value! While the loss and dice metric keeps changing. surface_distance also has a problem since it is always equal to "inf". I need an explanation of why this problem happens. So I could understand the solutions. Note: I am us...
I am estimating the difference between quantities of owned homes in particular census tracts between ACS 2021 5 yr estimates and ACS 2016 5 yr estimates. I'd like to know if the quantities of owned homes differ significantly between these two time periods. I am following ACS documentation in the 2018 ACS general handbo...
I need your help to define the optimal budget allocation using a marketing mix model. I have built a multiplicative model to account for diminishing return and interaction between my IVs, and I am asked to decide how to allocate a 30% budget more compared to the previous quarter (Q2). How could I do? I would like to fi...
Assume we have two sets of data $X_1$ and $X_2$ drawn from two different distributions. Are the loss of the empirical risk minimizer of $X_1$ on $X_2$: $l_{X_2}(f_{X_1})$ the same as the loss of the empirical risk minimizer of $X_2$ on $X_1$: $l_{X_1}(f_{X_2})$ the same? If not, is there any existing result characteri...
I am currently looking into developing a scale to measure a latent construct. I believe the latent construct is a property of conversation sequences. The scale I am developing has 4 a priori defined factors with about 6 items each. We are looking to recruit ca. 250 participants who will use the scale approximately 5 ti...
I PAC-bound I learned consider the following decompistion: $R(f) = R_n(f) + \left(R(f) - R_n(f)\right)$ where $R(f)$ is the test error, $R_n(f)$ is the training error $\left(R(f) - R_n(f)\right)$ is defined as generalization error. However in practice, we often talk about test/validation error with a slightly different...
I have generated a time series data set of measurements that are a bit noisy and I want to apply kernel smoothing to the data. My time series data is not regular however, meaning that the time difference between consecutive observations can be variable so I want to account for that within the weighting of the kernel sm...
So I have a dataset with about 6x features as I have samples, which are balanced across 8 classes. I set out to figure out which features are important for each label. I've been approaching this using Logistic Regression in the multinomial setting. Initially I had used all ~300 features but knew there was strong coline...
I’m trying to informally derive the chi-squared test statistic using a combination of basic geometry and algebra. I’m successfully able to obtain a system of equations that contain Karl Pearson’s chi-squared test statistic. But I need help showing that the test statistic = chi^2 from my equations. My approach: I have a...
Suppose we have a VAR(1) model: $$ \mathbf{X}_t = \boldsymbol{\Phi} \mathbf{X}_{t-1} + \mathbf{Z}_t, \hspace{10mm} \mathbf{Z}_t \sim WN(0,\Sigma) $$ If we can keep plugging that equation into itself, we get $$ \mathbf{X}_t = \sum_{j=1}^{\infty} \boldsymbol{\Phi}^j Z_{t-j} \tag{2} $$ as long as the eigenvalues of $\bold...
I'm still pretty new to modelling but essentially, the dataset is consists of the following (the first observation only): SeedAttachment.Number Seed NO.seed Species Syndrome Mountain Individual Method <dbl> <dbl> <dbl> <chr> <fct> <chr> <chr> ...
I want to apply the Mann-Kendall (MK) test to identify relevant trends in multiple time series, however literature on the matter tells me one hard requirement is for no serial correlation to exist in the data. In its turn, conventional auto-correlation analysis using ACF/PACF plots require stationarity, which is usuall...
I do statistics for a restaurant in which people arrive at random times and end up paying a random amount of money when they are finished. I am using a Compound Poisson Process to model this, but I have an issue with fixing the rates of our guests visits: people do not arrive at the same rates for each hour, does this ...
i've tried to find the equation for lq likelihood equation is: lq_likelihood <- ((f^(1-q))-1)/(1-q) and with f is pdf of lognormal distribution and q is distortion parameter(i'm using q=1-(1/n)) define u <- logf(x) u' is first derivative of each parameter the first derivation of lq_likelihood: sum (f^(1-q) * u')
Usually there are clear advancements in ML methodologies in research especially, where I can say X method is essentially better than Y method for most datasets. However, I recently accidentally stumbled upon SOMs, and they seem pretty cool, like an interpretable form of UMAP or tSNEs, with the ability to offer perhaps ...
I am learning the Gaussian process and feel confused about how three lines were generated in Fig 2.2(A) in the book "Gaussian Process For Machine Learning". As described by the author: "To see this, we can draw samples from the distribution of functions evaluated at any number of points; in detail, we choose a number o...
Good morning all together, as a statistics rookie, I'm facing the task how to test for a difference in the mean of two random variables that are bound between 0 and 1. Both their means are positive and in one case (potentially) autocorrelated as those random variables are time series. In detail, these random variables ...
As shown below and per the R code at the bottom, I plot a base survival curve for the lung dataset from the survival package using a fitted gamma model (plot red line) with flexsurvreg() and run simulations (plot blue lines) by drawing on random samples for the $W$ random error term of the standard gamma distribution e...
How do you know when a SEM shows as unidentified not because of the path diagram but because of the actual variables that you put in? The following model is well-identified according to AMOS, but when I simply replace variable X7 with variable X10 (which literally should change nothing), all of a sudden the model is un...
I want to compare two ranked lists with items and their confidence scores assigned by the model. The lists are non-conjoint, i.e. can have different items. The number of items is the same for both lists. For example; List A some 0.5 whole 0.32 great 0.26 all 0.14 same 0.08 List B whole 0.62 all 0.32 great 0.19 some ...
Say I have a set $\mathcal{X}$ and a partition $A := (A_{1}, \dots, A_{M})$, i.e. subsets such that $\dot{\cup}_{i=1}^M A_{i} = \mathcal{X}$ and the $A_{i}$s are pairwise disjoint. Say further I have a function $f: \mathcal{X} \to \mathcal{Y}$ that is piecewise constant on the cells of $A$, i.e. $$ f (x) = \begin{cases...
If the time series process is linear, then the ARIMA model is specified. The residuals from this model are $(1.)$ no autocorrelation $(2.)$ mean equals zero $(3.)$ constant variance. We say that this process is a white noise process. But under white Gaussian noise, how to proof no autocorrelation = independent? And how...
Please run this code in order to create a reproducible example: set.seed(1) n <- 10 dat <-data.frame(thesis = rep(c('Yes', 'No'), each = n / 2), satisfaction = c(sample(5, replace = TRUE, size = n / 2), rep(NA, n / 2))) dat$satisfaction_without_NA <- ifelse(is.na(dat$satisfaction), ...
I would like to request some help from the data science community. My task with machine learning is do achieve the following in pyTorch: I have an equation given by: $$ \frac{\mathrm{d} s}{\mathrm{d} t}=4a−2s+\lambda(s) $$ Where $a$ is an input constant and $\lambda$ is a non-linear term that depends on $s$. I know th...
Context: ... The public school system in the city where I live has high demand and low supply. You apply to some schools in order of preference and there is a scoring system to give priority to all applicants based on some factors (having another child in the same school, home proximity, job proximity, social factors, ...
I have 4 data points that represent the average cycle time for a process in one month. The data is of the full population, not a sample. I am trying to determine if there has been a significant change over those 4 months. Here are the data points, with 't' representing the month and 'ct' the cycle time: t ct 1 ...
I am currently working on a very imbalanced dataset: 24 million transactions (rows of data) 30,000 fraudulent transactions (0.1% of total transactions) The dataset is split via Year, into three sets of training, validation and test. I am using XGBoost as the model to predict whether a transaction is fraudulent or not...
I want to do a mixed linear model, with two hierarchical random effects. I want to determine wether if these random effects are worth including in the model. I have tried so far doing : library(nlme) # Mode lwith random effects but no fixed effects lme1 <- lme(var ~ 1, random=~1|r.var1/r.var2, correla...
I'd like to ask if somebody can help me to understand these plots, the meaning of dots dispersion on the plots. I can't understand how to read these plots. Link to the article https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7768686/
I want to compare two interval independent variable’s with t test how can I compare them?
I calculated a directionality map, where at each point (x,y) I have a jackknife sample (n=8) of 2d vector displacements $\vec{D}_k$ ($k=1,...,8$ are the black vectors in the figure below; red vector -> "centroid" or average weighted by magnitude; magenta -> simple mean vector). The figure represents a single (x,y) posi...
I'm comparing two groups of people on a binary variable. The number of successes is really small for the two groups (which wasn't expected, due to a lack of previous quantitative research on the subject) and the number of total observations is not so great (450), so we have group A with 2 successes on 225 observations,...
I am working on a project that is seeking to use the synthetic control method to estimate the effect of Costa Rica's military abolition on levels of democracy (0-1 interval). I'll attach my code here and plot the time series to demonstrate the initial issue I am having: library(tidysynth) synth.opto <- latin.am %>% ...
I want to assess the importance/association of many features (continuous) with a Y variable (continuous and, in most cases, skewed/normally distributed). So far I have tried running linear regression and extracted the beta coefficients for each X variable against Y. However, I am wondering if I could approach this task...
I am trying to implement a Gibbs sampler with three blocks, that's not actually a full conditional Gibbs sampler. Say I partitition my parameter $X$ into three: {$X_1$, $X_2$, $X_3$}. I inted to sample, in random order, $X_1|X_2$ and $X_2|X_1$ and then sample $X_3|X_2,X_1$. I am running into trouble initializing the al...
Consider $2N$ i.i.d random variables $x_1,\dots, x_{2N}$ drawn from an unknown distribution $X$. Let $f$ be a continuous function such that $f(X)$ has finite mean and variance. For $1\leq n\leq 2N$, suppose $\epsilon_n \sim \mathcal N(0, \sigma^2)$ is an i.i.d white noise and $\mathbb E[x_n\epsilon_n]=0$. Define $y_n=...
Suppose that I have a single regression model predicting daily total store sales. Initially the model was trained on only 1% sample of the data and I applied min max normalization to the store sales. Now I gain access to the raw data, and would like to train the model on the raw data instead. How should I transfer the ...
I have a time series of daily temperature with autocorrelation that looks like this: Of course, temperature is heavily autocorrelated. When looking at the partial autocorrelation plot, lags are significant up to the 15th lag. But now I want to use this data as input for a regression model of a dependent variable y (p...
When you filter on only viewing results with p<alpha, some of those "statistically significant" results go in the wrong direction. This is called a Type S error ("S" for sign). And the average effect size in those selected results is larger than the true effect size. Believing the magnitude of these effect sizes has be...
I want to predict whether the client will renew his/her subscription based on groceries consumption patterns. Suppose an order contain only one type of grocery. I have a DataFrame containing ratios of values for different types of groceries for each client and the total number of orders. Each ratio represents the numbe...
Assume we have data for two years, 2021 and 2022. When training, we use 2021 data to predict 2022 outcomes, resulting in model 1. Now during inference, we use 2022 data to predict 2023 results. Assuming the trend changes in 2022 and we have few months of data in 2023, is it possible to make model1 more accurate? A plau...
I am trying to compare the lodging resistance scores of different wheat cultivars in an agronomic trial. Lodging is the phenomenon in which wheat plant can bend and lean closer to the ground as a result of strong wind and rains, for example. My score goes from 1 (wheat plants are lying flat on the ground) to 9 (wheat p...
I have datasets from two bivariate normal distributions, $\mathcal{N}(\mu_x, \Sigma_x)$, and $\mathcal{N}(\mu_y, \Sigma_y)$ respectively. Now we know the correlation coefficient for these two distributions can be defined as $\rho_x = \frac{\sigma_{12}}{\sigma_1 \sigma_2}$ and $\rho_ y= \frac{\sigma_{34}}{\sigma_3 \sig...
I have a dataset of observations taken at random time points across a wide range of time. These are X-rays taken in a fashion that, sadly, is a bit random (clinic can get a bit manic). I have 70 patients. Each patient has between 2 and 8 images. This means about 300 images. The image capture time is random, but always ...
Given the representations of the mean values $$E[Y]=\int(1-F(x))\,dx$$ and $$E[X]=\int(1-G(x))\,dx$$ where $F$ and $G$ are the distributions of $Y$ and $X$ respectively, can I use them to find the expression (or a bound) of $E[|Y-X|]?$ For instance, is it true that $$ E[|Y-X|]\leq\int |G(x)-F(x)|\,dx?$$
I am working on my risk perception model using three measures- probability, affection, and severity. I have one item on a Likert scale (1-5) for each probability and affection. However, for the severity part, I have one item on the Likert scale (1-5) and 7 items of binary types (0,1). The Sample size is 203. I want to ...
In numerous articles I have read (Abadie 2021, Samii 2016, basically any Abadie piece that talks about the synthetic control method), the authors cite regression's reliance on extrapolation for weights as a negative feature for estimating causal effects. For example, Abadie 2021, in the section discussing the benefits ...
I have been fitting a bayesian GLM using brms. The code works well but when I loop this over several data and make it a bit more complex, R encounters a fatal error and crashes. This seems to be happening to other people when using brms. I am now looking into other methods to code this in R (eg, stan_glm, bayesglm), bu...
In computer graphics, you have an (MC)MC estimate $Q_i$ of the color value of the $i$th pixel and a true value $I_i$. Now you take $\epsilon_i:=Q_i-I_i$, which can be thought of as an "error image". Now, one has found out, that if the Fourier transform (https://vincmazet.github.io/bip/filtering/fourier.html) of $\epsil...
I applied a test for attachment and 2 different tests for internet addiction to 114 highschool students. All tests have a Likert scale 1-5. My hypothesis is that the attachment and internet scales will have a negative correlation. What are the relevant calculations that I need to perform, to include in a psychology bac...
Let $X_n$ be i.i.d with common df $F$. Let $M_n = \max (X_1, \ldots, X_n)$. Suppose $P(b_n^{-1} M_n \leq x) = F^n(b_n x) \to e^{-x^{-\alpha}}$ weakly, where $x > 0$ and $\alpha > 0$. Let $x_0 = \sup \{x \colon F(x) < 1 \}$. I want to prove that $x_0 = \infty$, and my book says that if $x_0 < \infty$, then for $x>0$, we...
I am studying approach to calculate how correlated 2 nominal variables are by using Cramers V. However when I have a simple 2x2 matrix that I expect high effect size, the calculated outcome shows otherwise. And the output of CramersV is 0.288. From the matrix, Material B shows 10X higher fail rate compare to Material...
Suppose you have a random variable $X$ and black-box function $f$. Suppose you also have prior estimates $m$ and $s$ of the mean and standard deviation of $f(X)$. How can we use this prior information to reduce the variance of a Monte Carlo estimator of the mean of $f(X)$? Thanks ahead of time! my attempts My first ide...
I am trying to causally evaluate an impact of a specific labor policy that was implemented in three U.S. states. I wonder if constructing a synthetic/artificial control method (SCM) for those states makes sense to resemble the treatment group? Specifically, based on my reading of econ/policy research that uses SCM, the...
What is the best statistical test for comparing two random forest models, where a different set of variables is made available for each model? I need a test where a power test can be used to justify a sample size. I'm considering using a paired t-test (see below). More specific information follows. Two random forest ...
I would like to ask a question regarding the interpretation of log-log interaction term in the Two-way fixed effect model. I have the following regression model: y_it = _0 + 2[ln(price_it)*ln(area_it)] + myu_i + phi_t + u_it here, y is years of schooling (continuous), price is housing price (continuous), and area is ho...
I want to examine the effect of being a grandparent on work. My data spans from 2000 to 2020. The model is $$\text{work}_{it}\sim \text{grandparent}_{it}+\text{covariates}_{it}+\delta_t+\varepsilon_{it}$$ where grandparent is an endogenous dummy variable instrumented by the dummy variable first_child_female ($=1$ is th...
Does anyone happen to be familiar with this method: fixed-effects ordered logit models (feologit in Stata)? In this paper: https://journals.sagepub.com/doi/pdf/10.1177/1536867X20930984 In the paper, this method was applied to panel-data. Is the BUC-tau method also suitable for case-control data? For example, two types ...
Referencing this Q/A, Andy offers two models that return the DiD lift estimate. Eq1: =([|=,=2]−[|=,=1])−([|=,=2]−[|=,=1]) Eq2: =1+2(treat)+3(time)+(treat⋅time)+ From appearances, the in eq1 is the same as in eq2, which is the lift attributable to treatment exposure under parallel trends assumption. [|=,=2] = 1+2+3++...
In Heffernan and Tawn's 2004 paper, they describe a procedure to sample multivariate data, conditional on one variable ($Y_i$) being extreme. The idea is that $Y_i$ is extreme if it exceeds some arbitrary threshold $v_Y = t(v_X)$. They propose a simulation procedure to simulate more extreme values of $Y_i$ and then use...
I have multiple cases, each having multiple independent variables measured over time. One of the variables represents known failure/success in the past, and I am trying to model a binary logistic regression to predict future failure/success (DV). Am I barking under the wrong tree? What will be the best model to move f...
I have a dichotomous outcome variable (ever disease) and a continuous exposure variable (chemical). I have already run the logistic regression for the ln exposure and gotten the odds ratio. However, because this exposure is fairly common, a per 1-unit increase doesn't tell you a whole lot. Therefore, I wanted to see if...
I think it is easiest if I describe my question using an example: Let $$ \mathbf{x} \triangleq [ x_1,x_2,x_3] $$ and for sake of explanation let's assume that $$ \{x_i \in [0,3] \}_{i=1}^{3} $$ which is to say that each element in the array $\mathbf{x}$ can take one of four values: 0,1,2 or 3. All combinations are allo...
My data is collecting deposition of particles from the atmosphere once a month for 11 months at two sites. I am testing to see if my two sites' data are normally distributed so I can determine what T-test to use to test for a difference between sites (thinking of Student t-test). But I need to make sure my two sites ha...
I am conducting a study that seeks to assess differences in fat distribution in transgender women, as compared to cisgender men and women. A prior study has previously published separate formulas derived from multifactorial linear regression of 3 predictor variables (age, BMI, and sex assigned at birth) for cisgender m...
I am doing a statistical test (program used is SPSS). On the basis of distribution and sample size, I have to chose the correct variable analysis. I also have to justify every decision. I have two independent groups with a sample size of $n=43$ and $n=12$. My first step is to decide whether the data in groups is norma...
I'm looking at the difference between bird communities across 5 different vegetation condition levels. Bird species richness data has been recorded across 40 sites, with uneven sample sizes for each of the 5 groups. From this species richness data, I have calculated a metric which gives a score of the health of the bir...
I have 10 features for 3 classes and all of them have a distribution similar to this (green, blue and orange is for class 0,1,2): I tried with NBGausian and LogisticRegression however it looks like that this algorithm is not good enough for them. Do you have any suggested algorithms for those?
GMM(Gaussian Mixture Model) itself is a mixture of Gaussian with each having the proportion of $\pi_k$, $$\sum_{k=1}^{K}\pi_k=1$$this is easy to understand. But when introducing the latent, I don't understand it, because there can only be one $z_k=1$, then how this is related to the soft assignment in GMM model?
My first time doing an LSTM and optuna. I wanted to use optuna to find the best values of batch size, epoch and optimizer. But when I do, I get a rmse value of 8.34 when I get a naive prediction of 0.69 and with a model with a set value of batch size of 8, epoch 4000 and optimizer SGD I get a rmse of 0.28. I could use ...
I am reading a paper that contains a Gibbs sampler for a regression model with parameters $\beta$ and design matrix $X$. One of the steps in the Gibbs sampler requires simulating from a binary random variable $Z$, and the authors only say Generate $Z$ based on $$ \frac{P(Z=1 \mid \beta, X)}{P(Z=0 \mid \beta, X)} = \ps...
I have 2 time series - one is for scores of people in a survey and the other for the sales of a product for 10 distinct countries. The survey data is categorized into 3 categories for each country. So, we have 10 * 3, i.e. 30 pairs. The data for the former is from April 2018 till Mar 2023 whereas for the latter, we hav...
An illustration David Blei in his lecture notes considers a collapsed Gibbs sampler for a Gaussian mixture model. In this case $B = (\mu_1, \dotsc, \mu_K)$ is a latent vector of means and $A = (Z_1, \dotsc, Z_P)$ is the vector of latent indicators, assigning the $p$th point to cluster $Z_P\in \{1, \dotsc, K\}$. Collaps...
I am stuck on understanding the best way to approach this problem from a purely statistical/mathematical way. Say that I have this data in the table below. It shows the comparison of prices for one hotel between two years with a breakdown of the board type and room type. Hotel Board Room 2023 Price 2024 Price 1...
I've begun working with the Gumbel distribution and started with the example in the package documentation at https://cran.r-project.org/web/packages/fitdistrplus/fitdistrplus.pdf. For the Gumbel distribution fitdist() requires start parameters (template is fitdist(data, distr, method = c(...), start=NULL,...)), where i...
Binary cross entropy is written as follows: \begin{equation} \mathcal{L} = -y\log\left(\hat{y}\right)-(1-y)\log\left(1-\hat{y}\right) \end{equation} In every reference that I read, when using binary cross entropy, they use labels 0 and 1, with activation the output layer is sigmoid. I wonder if it is possible to use cr...
In Bishop's Pattern Recognition and Machine Learning book(page440), it talks about the M-step in EM algorithm of Gaussian Mixture Model. I am confused about the likelihood function of M-step. By likelihood, it is usually $p(X|\theta)$, right? But when involving this latent variable in the maximum likelihood function, ...
I'm reading this paper about a genetic disease. In the paper, there's the following table where $DD$ means developmental delay and $ID$ means intellectual disability. From the table (last column) we know that $$ P(ID \& DD) = 0.82 \\ P(ID) = 0.43 \\ P(DD) = 0.52 \\ $$ Now, imagine that we have already observed that a ...
I have a large dataset and I want to check if there is any difference between the whole sample and the subsample. For example, I'm checking the difference in the age of patients in the whole sample and the age of patients with cancer (subsample).
I'm reporting odds ratios for a logistic regression. I'm including p-values but it doesn't include R-squared as elsewhere, it says that "Odds Ratios and Log(Odds Ratios) are like R-Squared". Is this correct, should you add e.g. McFadden R^2^ to odds ratio results?
I have developed different kinds of RNNs (such as LSTM,GRU etc.)to predict future values of thermocouple measurements. The residual errors look like they do not follow normal distribution, so I wanted to explore their skewness and kurtosis values. Can I somehow correlate the values of skewness and kurtosis (for example...
My master's thesis involves modelling fMRI data. Each of $M$ participants has a total of $N$ voxels being measured. All these measurements represent an activation amplitude. Aside from this, I have data on participant characteristics (e.g. age, gender, etc.). My aim is to get posterior distributions across the assignme...
Assume $Y_{ij} \sim N(\mu_i,\sigma^2)$, $\mu_i \sim N(\eta,\tau^2)$ for $i=1,2$ $j=1,\cdots,n_i$ and prior $\pi(\eta,\tau^2,\sigma^2) \propto Ca^+(\tau^2,0,b_{\tau}) \times Ca^+(\sigma^2,0,b_{\sigma})$ where $Ca^+(x; 0, b)$ is the truncated Cauchy distribution with pdf $$f(x|b)=\frac{2}{\pi}\times \frac{1}{b[1+(x/b)^2]...
I have two very large independent groups (n=30,000 and 12,000). Each data point is an individual’s UK Deprivation Index decile (the Deprivation Index itself is a ranking from 1 to 32,844 of an area’s relative deprivation where 1 is most deprived). My hypothesis is that one group is more deprived than the other, i.e. ha...
I have datasets from two bivariate poisson distributions, $BVP_x(\lambda_1, \lambda_2, \lambda_{12})$, and $BVP_y(\lambda_3, \lambda_4, \lambda_{34})$ respectively. Now we know the correlation coefficient for these two distributions can be defined as $\rho_x = \frac{\lambda_{12}}{\sqrt{(\lambda_1 + \lambda_{12})(\lambd...
Say we have $N$ independent Gaussian variables $X_i$, each drawn from a mean-zero Gaussian with variance $\sigma_i^2$, where in this case I assume I know the $\sigma_i^2$. Define the weighted average as $$ \bar{X} = w \sum_i^N X_i / \sigma_i^2, \ \ w = \left(\sum_i^N \sigma^{-2}_i\right)^{-1}. $$ Then define the weig...
I have a data that contains demographic information and primary variables (A,B,X,Y,Z) that extracted from past 20 years literature review. All those literature reviews are about case study, so in the data that we collected, each row is a person that selected from different case studies. Therefore, the data is like the ...
I started working with the Gumbel distribution and fit it to the lung dataset to try it out. I then compared it with the survival curve using the Weibull distribution, which provides the best fit per goodness-of-fit tests and also hews closely to the Kaplan-Meier plot as shown below. When averaging the death rate in th...
In A General Metric for Riemannian Manifold Hamiltonian Monte Carlo (Betancourt, 2013), the author writes: The first [5] and still most common choice of the conditional density, $\pi(p|q)$, is a standard gaussian, [...]. This choice, however, ultimately limits the effectiveness of HMC when applied to intricate target ...
Let $X_i$ be a binary random variable where $P(X_i = 1) = p$. I want to find the MLE estimator for $\theta = p(1-p)$. The likelihood function should be $$ L(\theta) = \prod_{i=1}^n p^{x_i} (1-p)^{1-x_i} = p^{\sum_{i=1}^nx_i}(1-p)^{n- \sum_{i=1}^nx_i}, $$ How should I proceed? Seems like I can not just take the derivati...
I am looking for advice on the best practice to determine hyperparameters for my LSTM model. I have time series data that I have divided into train and test sets. I was planning to use an expanding walk forward cross validation scheme on my train set to determine the hyperparameters and then use the test to obtain a fi...
Let’s say we want to check the effect of the interaction of education level and gender of the salesperson on number of units sold by them. We have thousands of sales people in the data, but they only come from 10 companies: 4 of them hire (almost) only men, 4 hire almost only women, and 2 companies hire both men and wo...
Let's say I am working with a state $X$ split into three parts $U$, $V$, and $W$. I can efficiently sample from $W|U,V$, $U|V$, and $V|U$. My initial intuition was to do a variable-at-a-time Metropolis Hastings algorithm to sample $X$. However, I then realized that the candidate density defined by the following mixture...
I am building a model that predicts a target variable using daily weather data. I am trying to understand which weather lags influence my target variable the most. The issue is some weather lags are highly correlated - for example, if I use monthly weather aggregates, January and October for some bizarre reason have hi...
I am training a regression machine learning model to predict an airplane's maximum take-off weight based on some pre-project features. The airplane weights in the dataset I'm working with are registered in kilograms. The model is not expected to be highly precise; it is intended to provide a robust estimation of the we...