instruction
stringlengths
9
38.7k
I have made the following model in DAGitty: Where X2 is controlled for. DAGitty says: The total effect cannot be estimated due to adjustment for an intermediate or a descendant of an intermediate. My understanding is that I can estimate the total effect if I control also for X1, other than X2, as that would block th...
Please help me to figure out the final result in a glmmTMB. I used this code model1<-glmmTMB(ctmax ~ lat+ (1|site), dispformula=~lat,data=data) summary(model1) got this output Family: gaussian ( identity ) Formula: ctmax ~ lat + (1 | site) Dispersion: ~lat Data: data AIC BIC logLik d...
I've come across two different formulas in my studies to calculate the output shape of a convolution. Below, $I$ is the input image size, $K$ the filter size and $S$ the stride. $$ \lfloor \frac{I - K + 2P}{S} \rfloor + 1 $$ and $$ \lfloor \frac{I - K + 2P}{S} + 1 \rfloor $$ I've computed quite a few examples and I com...
I have read on many occasions deep learning practitioners recommending to treat regression problems (with continuous variables) as classification problems, by quantizing the output into bins and using cross-entropy loss instead of L2 loss. For example these notes from Stanfords's CS231n class on CNNs: It is important ...
This time, I calculated a non-negative dataset which SD is larger than mean I have seen many people use 'mean ± SD' to show mean and standard deviation. But I wonder whether we can use that form for non-negative dataset. The original data can't be lower than 0 but if I use ± it looks can be negative number(like 1 ± 3)....
I’m working on a report on length of berth stays for cargo vessels visiting different ports. I would like to be able to benchmark whether vessels in a given fleet (i.e. a customer’s entire fleet of vessels) have shorter/longer berth stays than other vessels calling the same ports. The length of a berth stay depends on ...
I face with a problem of doing a time series forecasting on multivariate data in the form where different entities have their own 100-day (daily) series of 10 variables, and I'm expected to predict 10-day steps of the response variable in the future. Now, I'd like to handle "outliers" in the data, and I wonder how to i...
Can someone please summarise the difference between these 3 boosting algorithms: AdaBoost vs GBM vs XGB?
A real-valued feedforward/fully connected neural network with activation function $\sigma : x\in \mathbb R \mapsto \max \{0,x\}\equiv \text{ReLU}(x)$ can formally be seen as a function $f_\theta :\mathcal X\subseteq \mathbb R^{d}\to\mathbb R$ defined by the expression $$f_{\theta} (x) = A^{(L)}\circ \sigma \circ A^{(L...
I ran this code and found the result. Could you please help me to figure out my model follows DHARMa residual? model1<-glmmTMB(ctmax ~ lat+ (1|site), dispformula=~lat,data=data) summary(model1) Got this result:
My dataset is composed of various country-level observations over the years. I am interested in the cross-sectionnal dimension of my database rather than the time series aspect. For this reason, I decided to turn this panel dataset into a cross sectional one. To do this, for each variable, I take the mean value of each...
I have a sample of data with n=200 and I would like to predict my descriptive statistics such as mean, Std Dev and 95% CI when I have specific sample size for example n=10 based on the current study. I assumed my population follows the Normal distribution and I applied t test to calculate CI. What I have done, I appli...
Let $X$ follow normal distribution with mean $\mu_X=10$ and variance $V_X=20$. Let $Y$ follow truncated normal distribution with mean $\mu_Y=-10,V_Y=8$, where $Y\leq 0$ by truncation. Let $Z=X+Y$. Denote $z_1,\dots, z_N$ be $N$ realizations of $Z$. Now I want to recover $\mu_X,V_X,\mu_Y,V_Y$. Suppose I put appropriate ...
I am testing simulation of the lognormal distribution against the lung dataset, as an example of right-censored data, from the survival package. Goodness-of-fit tests indicate Weibull provides best fit, but please bear with my example as I try getting my arms around the lognormal distribution too. When I run the code p...
I wonder if using a propensity score in the following situation is wrong. Imagine I have the next causal model $$X = N_x$$ $$Y = f(X, N_y)$$ $$ Z = g(X, Y, N_z)$$ Where $N_z, N_y, N_x$ are independent random variables. One example of such a model is $X$ is race, $Y$ is education $Z$ is income. If I wanted to estimate ...
I originally asked this question on stackoverflow here, but was advised to move it to Cross Validated for a more appropriate place to have this discussion. A commenter pointed out that my situation looks like it could be an example of the Simpson's Paradox. While this seems fitting based on the description that "a tren...
I'm using scikit learn's 'KFoldStratified' for a classification task where I have 64 samples, evenly split across 8 labels. I notice the folds are as follows: Test 0, 8, 16... Train 1...7, 9... 15 Where the first element of each label is used in the test set and the remainder in the test set. The same situation is set ...
I want to train image segmentation model using U-Net with pretrained ResNet34 as encoder. My dataset is really small, i separate it with Train data : 57 images Validation data : 16 images Test data : 8 images So, with that data, i want to use image augmentation on train data, but should the validation data be augment...
Context Assume a game using a fair 6 sided dice ends when one rolls a 6. A random variable N is the total number of throws. N is distributed such that: $p_N(n) = \frac{5}{6}^{n-1}\frac{1}{6}$ Assume you win 1 point for an even number, and -1 point for an odd number. $X_i$ is a random variable denoting point's gained fr...
I am working on a high-imbalanced (80-20 ratio), high-dimensional dataset (200 sample size, 300 features) where all variables are highly correlated. Can I remove the perfectly correlated (using Pearson's correlation coefficient) variables (6 variables) before cross-validation? Does this cause any information leakage?
Apologies if this is too simple of a question. I work with population data from the census, which provides a margin of error for all their variables. Reviewers have asked that I account for the MOE in census data but I'm not quite sure how to do that in a regression model. For example, in large census tracts, there can...
I have 8 measures: A_1, A_2, A_3, A_4, B_1, B_2, B_3, B_4. I know from the correlation matrix that they are all related. I would like to find the latent variable structure. Using lavaan in R, I found that the first four variables (A_1, A_2, A_3, A_4) can be explained by one factor/latent variable: mA <- 'fA =~ A_1 + A_...
Currently I watched the videos (links below) that argues using the normalization (max-min scale) is the bad idea when it comes to the stock prediction. In the videos, the editor aruges that people should use stadardization instead of normalization, becasue in the prediction, you never know the "highest" price and "lowe...
I'm experimenting with univariate time series using the following approaches that suit time-series analytics in order to transform the data in a way that the inputs to the model are the targets of previous K observations: 1. lookback period, example1, example2 #ِDataset matrix is formed def create_dataset(df , lookback...
I have a question concerning different results between linear regression and the direct effect of mediation analysis. Indeed, linear regression between predictor X and outcome Y showed a non-significant relationship. However, when I add a mediator within a mediation analysis, the direct effect between X and Y is signif...
[EDIT: had fundamental misunderstanding, rephrasing question - thanks to @whuber for catching that] I have some pretty simple regressions (linear & logistic) predicting a rate (continuous response var, linear regression) & direction (binary response var, logistic regression) from certain features of the distribution of...
Let $\bf A$ be an $n \times n$ matrix with rank $r$ where $r<n$. How can I get a full-rank approximation for $\bf A$? In other words, I want to find the rank-$n$ $\bf X$ that minimizes the Frobenius norm $\|\bf A-\bf X\|_{\text{F}}$.
I want to run a diff-in-diff regression for a pre-post rollout experiment. Assume for a moment that I have subjects impacted by the experiments. To validate the trends, I AGGREGATE subjects to a daily basis, and I found a 'PERFECT' (assume this) parallel trends between my control and treatment on a daily basis. Once I ...
Let's consider a multi-class classification problem with 4 classes: 0, 1, 2, and 3 F1-Score 'macro'-averaged is calculated like that: F1_macro = 0.25*F1_class0 + 0.25*F1_class1 + 0.25*F1_class2 + 0.25*F1_class3 On the other hand, supposing that the relative supports for the classes are: class 0: 0.4 class 1: 0.1 clas...
I’m working with big, imbalanced data set for a binary classification challenge. Big in the sense that it’s hard to digest all at once, and imbalanced in the sense that for every positive example there are about 1000 negative examples. My approach: reduce size by down-sample the negative examples in a manner that woul...
I am working on a computer vision problem (chessboard recognition), and my goal is to find the lines that correspond to the chessboard lines. I want to do this via Hough transform, since said lines usually appear as a bunch of clustered points along a sinusoidal curve (although I approximate the curve with a straight l...
If there is discrete-time batch markovian arrival process with parameter matrices ${\bf D}_k$, $k\geq 0$ then the mean arrival rate per time slot is given by $\lambda={\bf \pi}\sum_{n=0}^\infty n{\bf D}_n{\bf e}$, where ${\bf \pi}$ is stationary vector for D-BMAP and ${\bf e}$ is column vector of all elements one. Now ...
I'm really lost in this topic, and I want to ask for help here. I have a continous variable of interest (X), but also factors that I think they can affect my results (for me the most interesting factor is Sampling site). So, I have made this formula for adonis2: X ~ Sampling Site + Year + Sex + Age + Sample Type (Sampl...
I have a complex physically-based biological model which solves partial differential equations to predict the number of individuals in a certain community as a function of temperature, salinity, and chlorophyll concentration. Therefore I have 20 years of daily data for the number of individuals N (i.e., the model outpu...
Is there a term or name (or better yet, strategies) for the following problem? Take a 'standard' $k$-armed multi-armed bandit problem (stochastic real rewards, IID pulls for a given arm), but instead of maximizing the mean sum of rewards across $H$ pulls, maximize the mean maximum reward across $H$ pulls. (I know that ...
My data has 5 dependent variables (measured amount of oxygen, halides, nitrogen, sulfur, and organic) and one independent variable with 2 "treatments (flow rate, 1 Lpm or 2 Lpm). The catch is: I have multiple pairs of data for 2 treatments, which are not for the same sample (each pair is its own sample, taken at a diff...
I am calculating the odds ratio of a binomial logistic regression model using exp, is there a function to calculate the 95% confidence intervals? model_1 <-svyglm(formula = ACV_COVIDCAR_NEW_1~DMV_H_OPMDCD_combined_factor, design = data2, family = "binomial" (link="logit")) summary(model_1) exp(coef(mod...
I like to do feature selection and I am using multiple feature selection algorithms provided by sklearn. What I have done is, use a bunch of feature selection algos and get the score for each feature. This returns a dataframe where the index is the features and columns consists of the scores returned by the different f...
I am conducting a meta-analysis and am trying to produce a forest plot displaying the mean weighted effect size with and without the outliers. I looked on so many websites and tried a lot of syntaxes, however, didn't really find anything about what I am looking for. Assume there are 5 studies in the meta-analysis. Outl...
I have some data that looks like: $x_i$ $y_i$ 10 20 11 21 12 25 1000 2001 The current method for forecasting an unseen $y'$ based on a known $x'$ is to estimate it as: $$\hat y' = \frac{1}{n} \sum_{i=1}^n \frac{y_i}{x_i} x'$$ That is, we take the arithmetic mean of the ratio of $y$ to $x$ and apply it...
I am trying to build an ARDL model with the six following variables: lnNO2,lnP,lnGDP,lnEI,lnU and lnU2 (one response and five dependent variables). The variables I am using are shown below: One of the preconditions of an ARDL is that all the variables are either I(0) or I(1). But when I conduct the Zivot-Andrews unit ...
Is it normal to have different results pattern if data sort is different but the covariances are the same when calculating with propensity score matching in R? There is data with sample size of about 100. If I calculate for P-value of the operation time from the data sorted by the operated day, there is no significant ...
I'm very new to all this so please bare with me. All advises and corrections are welcome. Context I have the following dataset: id,level,condition #123,1,0 #576,1,0 #663,2,1 #945,1,1 #712,3,0 #981,1,1 #851,3,1 #361,1,1 etc... the id for each user is unique. I have one row per user. The level is the level of engagement...
Consider a normally distributed random variable $X\sim N(\mu,\sigma^2)$. Since $\Pr[X\leq x]=\Pr[(X-\mu)/\sigma\leq (x-\mu)/\sigma]$, the following equality holds: $$\Phi(x|\mu, \sigma^2)=\Phi((x-\mu)/\sigma\;|\;0,1)$$ where $\Phi(\cdot|\mu,\sigma^2)$ is a CDF of a normal distribution with mean $\mu$ and variance $\sig...
Suppose the distribution $F$ is absolutely continuous. Is there a way to compare (i) the monotonocity of the hazard ratio (i.e., strictly decreasing/increasing); (ii) the skewness of the distribution (i.e., positive or negative); and (iii) the concavity or convexity of the survival function. I have the intuition that a...
I have a code segment from this repo: https://github.com/toshikwa/slac.pytorch/blob/master/slac/utils.py I am reading a paper about Soft Actor-Critic, a reinforcement learning algorithm. They have you sample from a Gaussian Log distribution. I believe that would mean you use the PDF to sample from. I am making a lot o...
I ran a multiple regression using statsmodels. I wanted to verify my understanding of calculations for log-likelihood (ll), AIC and BIC. So I attempted to manually calculate the ll, AIC and BIC for the regression and compare my results to what I got from statsmodels. The results I got are a bit off for AIC and BIC. Bel...
Consider a null hypothesis: \begin{align*} H_0:\;\beta=0 \end{align*} Here, we can estimate only the upper and lower bounds of $\beta$. To be clear, let the upper and lower bounds of $\beta$ be $\alpha_u$ and $\alpha_l$, respectively, then what we can get is the estimate $[\widehat{\alpha}_l,\widehat{\alpha}_u]$. I am ...
Suppose we take the classical linear regression model: $$y_i = \beta_0 + \beta_1 x_i + \epsilon_i$$ Over the years, I have heard so many people say that such an interpretation can be drawn from this model: On average, a one unit increase in $x_i$ "causes" a $\beta_1$ unit increase in $y_i$ However, we are also told t...
Power, in a two-sample test, is partially determined by the narrowness of the confidence interval for the test statistic the alternative hypothesis is tested over. This is captured in this photo via Wikipedia I'm confused how power can be calculated in the case of a one-sample hypothesis test of means, where we're set...
If feature importance is only calculated from the training set according to here, does it mean one should never compute shap values on test set? What would it mean if I compute shap values from test set ? For instance, if i have the following code, clf_opt is a random forest estimator and the code runs without any erro...
I have 100k historical horse races. The data is sequential in time, so I am wishing to use online learning to train an LSTM (or sequential attention model or something similar...) such that the model updates after each race. The output of the model should correspond to the probability of each horse in a new race winnin...
Background Discussion from http://blog.geomblog.org/2005/10/sampling-from-simplex.html and https://cs.stackexchange.com/questions/3227/uniform-sampling-from-a-simplex have shown algorithms of sampling from unit simplex uniformly: Let $X_i \sim Exponential(1)$. Then $X_i/\sum_i X_i$ gives an uniform sample in unit simp...
I have relatively large data sets with about 20000 to 25000 data. The data are the orientation angles (0 - 180°) of fibers in a composite material. You can see two example histograms showing the most extreme histograms. The first one has a "nice" bell-shaped distribution, the second one is also bell-shaped but the tail...
There is a folklore white noise hypothesis related to (and equivalent to some forms of) the efficient market hypothesis in finance -see references below. But are there some asset pairs whose return time series (or perhaps some "natural" transforms of those time series) are approximately noises of another color than whi...
There is a lot of contradictory information about the purpose of phase 2 clinical trials. Many sources claim that the aim is to test whether a treatment works, and sample size calculators exist to compare a response rate in a treatment group (as a binary statistic) to a historical control. But it's clear that a phase ...
I am trying to find a way to calculate the likelihood that a machine will fail. Specifically, I would like to receive a prediction such as, "There is a 28% chance that this machine will fail within the next 3 days." To do this, I have a time series of sensor data and a known limit for failure. For instance, let's say I...
So I have got a set of data, which consists of the abundance of each butterfly species in each sampling point, and the temperature of their respective sampling point. Can I first do a Spearman correlation to test the effect of temperature on the overall abundance of butterflies then repeat it again with each species to...
I was modelling a linear regression (OLS) and tried using scaling techniques on the predictor variables. I could see the range of the variables change, however the prediction results remain the same. I would like to learn why scaling does not affect the prediction output but the coefficients. In addition the accuracy a...
I already asked this question in the "Mathematics" stackexchange, but apparently did not find the right audience, so I am duplicating my question here, hoping someone might be of help. My question is: what is the relationship between the Cramér-Rao Lower Bounds (CRLB) and the uncertainty propagation formula? I would ha...
In Christopher Bishop's PRML book,in section 1.4, the author explains how intuition fails in higher dimensions. He does this by using a gaussian distribution in higher dimensions. He concludes the following- If we transform from Cartesian to polar coordinates, and then integrate out the directional variables, we obtai...
I have 2 groups of participants A and B in an opinion survey. Participants A give an opinion on a group of "objects" X and participants give an opinion on a group of "objects" Y. Opinions are values on a scale 1 to 5. (I have all scores, but can not do additional surveys) The mean values (opinion scores) for X and Y ar...
I'm new to Survival Analysis. Usually in survival analysis, we want to model the survival function progress w.r.t time. This is normally done through Cox model, or KM-model within a specific time horizon However, this assume that we know exactly when the hazard event occurred. If we want to model a system which we can ...
We have a rather mathematical/statistical problem and hope to get some help. We have data from a multicenter randomized clinical trial where we compare single with combined treatments at 4 different time points (baseline, interim visit, final visit, follow up). We fitted a mixed effect model to predict the outcome by t...
I'm looking at the association between two categorical variables in a genus of birds. The variables are 'Conservation Concern' (Yes/No) and another binary variable (Yes/No) and I have these for every species in the genus. I know there may be issues with the variables (i.e. have they been adequately described) but they ...
I want to follow a similar approach to what was done in the paper of Bornkamp et al. in 2021 (DOI: 10.1002/pst.2104). More specifically they added a link to a R markdown file (https://oncoestimand.github.io/princ_strat_drug_dev/princ_strat_example.html) with a working example how to implement the principal stratum stra...
I am studying the effect of employment on population growth using barroregressions. The dependent variable is thus the average log population growth in Norwegian regions between 1995 and 2013. The controls are log population in 1995 (initial population to see if there were divergence in Norwegian regions in the period ...
I am trying to assess the effects of an experimental treatment on the insect fauna of artificial ponds. The treatment is applied to the entire pond. I was able to sample each pond four times, each sample collected from a different spatial location within the pond, but at the same moment in time. So I have replicated si...
I am performing a Bayesian calibration of a computer model and wondering if I am setting up my likelihood correctly. I have model output generated using Monte Carlo sampling of prior distributions of model parameters. I then assign a score ("likelihood") to each simulation in my ensemble using model-observation misfit:...
Instrumental variable regression is estimated with ivreg in R. ivreg provides diagnostics with the diagnostics option in summary. The first stage is similar to an OLS regression where the endogenous variable is regressed on all instruments and exogenous variables to check instrument relevance. The weak instrument test ...
We have a dataset on cancer patients who have consented to join a study after their diagnosis, which could be months or even years later. After some follow-up, an event occurs. We can fit this data using the following code in R: fit <- survfit(Surv(time, status) ~ group, data = data) Here, the variable time represents...
I am trying to build my first VAR model, consisting of three time series, for forecasting and have gotten quite far. I have made all the tests and comparing models indcluding different lags, different adjustments, inclusion of dummy variables, and different orders of differencing the variables. But I really do not know...
I am trying to generate random parameters for the lognormal distribution in order to test parameter sensitivity and for simulating (predicting) future survival rates, using the lung dataset. I realize the optimal fit for lung is Weibull, but I am trying to get my arms around lognormal in a survival environment (I have ...
Textbook literature often denotes the estimated weight matrix of a linear regression model $y = Wx + \epsilon, \epsilon \sim \mathcal{N}(0,\sigma^2)$ by $\hat W$ due to the inherent variability in the sample size. Limited access to all possible instances hinders our ability to find the true matrix $W$. Additionally, th...
Problem Setting/Context: I have feedback(each feedback has multiple sentences) associated with different products(you can safely assume that a feedback talks about one single product), I need to assign a continuous score for each feedback, for simplicity lets assume that this score can lie between 0 and 1(on a continuo...
I am a masterstudent in behavioural sciences, currently writing my thesis. Unfortunately statistics isn't my biggest talent, so I was hoping someone out here could help me with an issue I am facing. I have a dataset in SPSS with missing values for different variables. I ran a Missing Value Analysis using EM but SPSS co...
I can estimate a linear probability model on about 126,000 firm-quarter observations, but estimating the same model using logistic regression drops the usable sample to only about 75,000 observations because of complete separation of data points (certain state fixed effects have no variation in the dependent variable)....
I'm looking to understand this simple model in R: m1 <- lmer(Y ~ exam_type + (1 + exam_type | subject ) ) Assume we have a dataset where: Y is numeric exam_type is a factor with 5 levels, let's say subject is also a factor, with many levels ( you can interpret this as a student id ) Specifically, could someone please...
I am using the MLMED macro to test a 2-1-1 moderated mediation model where repeated measures (Level 1) are nested within individuals (Level 2). Theoretically, my moderator is on Level 1 as it changes with time, but I want to model it as a Level 2 moderator in order to be able to use MLMED (MLMED cannot handle level 1 m...
I have a dataset with a dependent categorical variable N = {1,2,3}, and five independent continuous variables. I am running multinomial logistic regressions for all independent variables together and alone, but I also want to find an optimal model (similar to minimum AIC). However, I appear to be unable to find a way p...
I have repeated measures (two assessments) of an independent variable (binomial/two different groups) but dependent variables (continous) measured at only one assessment - what analysis approach would be appropriate? I checked if there are significant differences regarding those variables between the groups. I also did...
I have a generalized additive mixed model (GAMM) I'm using for modelling fish counts and many covariates to test (with different proportions of NA's in each covariate), but not enough data to include them all in the same model at once. I'm aware of, but don't fully understand, the select=TRUE method and have also been ...
I am looking to develop a neural network in which the output from one set of nodes is "orthogonal" to the output from another set of nodes in the sense that if the first set of nodes is used to predict A then the second set of nodes is uninformative of A. For example: from tensorflow.keras import Model from tensorflow....
Show that for testing the hypothesis $H_{0}: \theta_{1} \leq \theta \leq \theta_{2}$ versus $H_{1}: \theta<\theta_{1}$ or $\theta>\theta_{2}$,or the hypothesis $H_{0}:\theta=\theta_{0}$ versus $H_{1}: \theta\ne\theta_{0}$ in the one-parameter exponential family ,the UMP tests do not exist. We can find some specific exa...
I'm trying to solve the following: Given a standard one-variable linear regression model $$y = \beta_1 x + \beta_0 + \epsilon$$ where $\beta_1, \beta_0\in\mathbb{R}$ and $\epsilon\sim N(0, \sigma^2)$ with $n$ sample data points $X\in\mathbb{R}^n$, how to calculate the expected value of $R^2$? Thanks! WLOG, assume the m...
I have three times series (X, Y and Z) with a length of 2000 observations. I am fitting three different models: $Y_t = \beta_0 + \beta_1 Y_{t-1} + \epsilon_t$; $Y_t = \beta_0 + \beta_1 Y_{t-1} + \beta_2 X_{t-1} + \epsilon_t$; $Y_t = \beta_0 + \beta_1Y_{t-1} + \beta_2 Z_{t-1} + \epsilon_t$. The adjusted $R^2$ of the s...
I know that given a moving average process in the form $$X_t= \Theta(B) \varepsilon_t$$then $X_t$ is invertible if the roots of $\Theta(B)$ are outside the unit circle. But what about something in the form $$X_t= a + \Theta(B) \varepsilon_t ?$$ It seems to me that $X_t -a $ is invertible if the roots of $\Theta(B)$ are...
Deeply sorry as this wasn't really covered in my statistics classes. I am current comparing datasets for people divorcing vs. dissolving their marriages. I have two variables, length of marriage, and age of the parties, that are not normally distributed. length is skewed positively. The Age is a little flatter than the...
I am doing the nearest neighbour matching from the package MatchIt. For example data("lalonde") m.out1 <- matchit( treat ~ age + educ, data = lalonde, method = "nearest", distance = "glm", replace = FALSE ) But this algorithm is sensitive to the order that the treated units are matched. As in The ...
As background Mitochondrial Eve is the name give to our common ancestor about 200,000 years. I was asking about this in the biology stack exchange, but it seems like kind of a math question. Mitochondrial DNA is passed from mother to daughter. A women could say all of her daughters would have her Mitochondrial dna. Al...
For an integer $k > 0$, $\mu_i \in \mathbb{R}$, and let $\zeta_i \sim \mathcal{N}(0, 1)$, $1 \leq i \leq k$. In the background we are taking $k \to \infty$. Then the random variable $T$ has a scaled Noncentral $\chi^2 (k , \lambda)$ distribution: $$ \begin{align} T &= \frac{1}{k}\sum_{i = 1}^k (\mu_i + \zeta_i)^2, \\ \...
I am using Statsmodels SARIMAX to make forward-looking forecasts and I want to be able to reproduce my forecasts at a later time. Is there any way to ensure that forecasts will be the same between different runs and is there any functionality for setting a random seed?
Should I be doing a paired or unpaired 2 sample t-test for my data? I have 5 age groups (e.g. 0-44, 45-65, and so forth), and I have data for a 7-year period of deaths per those age groups. Should I be doing a paired 2 sample 2 test as the deaths are directly related to the ages?
I would like to train a neural network to learn a probability distribution. (Density estimation of a model-independent "true" probability density function of a given output.) That is, I have a set of training examples where a real-valued output is drawn from a certain (unknown, non-parametric) probability distribution,...
I got some idea about gam (generalized additive model) plot from a course of Noam Ross. However, I have several confusion and got stucked. I fit a logistic gam and can interpret by using trans=plogis. But when interpreting in terms of link function, I don't know how to interpret them. The plot shows y-axis range that i...
Given an even number of sample points in a plane, I want to compute the sum of squared distances from the sample center as part of estimating the Rayleigh parameter. One way of doing it is to compute the sample center ($\bar{x}, \bar{y}$), then $r_i = \sqrt{(x_i - \bar{x})^2 + (y_i - \bar{y})^2}$ and then I compute $\...
I am studying letality in cardio-vascular events. My outcome is binary (death at 1 month) for each event. My patients can have multiple cardiovascular events but obvioulsy only one of them can lead to death. So for exemple a patient can have ten cardiovascular event the last one leading to death. I have explaining vari...
I'm interested in adding basis functions to a Gaussian Process. In particular, following Section 2 of Rasmussen's book, I have $$g(x)=f(x) + h(x)^\top\beta,\qquad f(x)\sim\mathcal{GP}\left(0,k\left(x,x'\right)\right).$$ In the book, $\beta\sim\mathcal N\left(b,B\right)$ and therefore, everything can be nicely derived b...
My question arises from an assignment rule which gives monetary transfers to cities with a population of less than 25,000 inhabitants. However, the transfer varies between cities depending on its respective population and poverty levels. With that context, is it possible to run an RDD? If so, which literature is sugges...
I need some help/advice for tackling the following problem: interested in exploring the association between various covariates and the reason for termination from a data registry. The hypothesis/suspicion is that a lower proportion of ethnic/racial minorities will get kidney transplant rather than dialysis at time of e...