instruction
stringlengths
9
38.7k
To compute the control limits using the 3 sigma rule, the standard deviation is usually approximated by the formula: $\sigma=\frac{\overline{MR}}{1.128}$, where $\overline{MR}$ is the average of all the moving ranges of two observations, given by pattern: $\overline{MR}=\frac{\sum_{i=2}^{N}|x_{i}-x_{i-1}|}{N-1}$ $N$ is...
I have two time series data sets. The first is a population over time and the second is a normalized COVID effect factor over time. What I want to do is remove the COVID effect from my first time series using the second time series. I am curious how I would do that. I believe I can take the following steps, but I am...
I am running MCMC analysis on a model using an observation data point. After the MCMC run has converged, when I check the best fit parameters and compare it to the constraints of the model parameters, I find that they are sometimes within 99% confidence limits of the model parameters but not 68% limits. How probable, i...
Currently, I am going through Chapter 12.3 of Probabilistic Graphical Models - Principles and Techniques which talks about MCMC sampling methods. In Chapter 12.3.4.1, it states the following theorem: If $\mathcal{T}$ is regular and it satisfies the detailed balance equation relative to $\pi$, then $\pi$ is the unique ...
If I have an arbitrary Euclidean distance matrix $D=(d_{ij}:i=1,\ldots, I; j=1,\ldots, I)$ and I want to reconstruct its elements (pairwise Euclidean distances) via classical Euclidean MDS. That is finding (a possible solution) $x=(x_{ih}:i=1,\dots,I; h=1,\dots,H)$ such that $$ d_{ij} = \sqrt{\sum_{h=1}^{H} (x_{ih}-x_{...
This question might be really easy to answer, but I am not able to figure it out. For a project, I calculate sample sizes for a one sample t-test using the pwr package in r using the pwr.t.test function. As input for the function (as an example) I use the following: pwr.t.test(d = 1/1.91, sig.level = 0.05, power = 0.8,...
I know the specificity and sensitivity of a test are both 90%. The incidence is 2.5%. The total population is 10,000 and the number of people with the illness is 250, how do I calculate the true positive, true negative, false positive and false negative values?
Hello I have 100 students who answered the question, time spent sitting and I divided it into three groups: Group 1: (6-9) hours Group 2: (10-13) hours Group 3: (14-17) hours Also the students answered the Boston questionnaire for symptom severity scale Which is 11 questions, and each question has scores from 1 to 5. B...
I'm running the model: model <- lm(y~ index1*gender +education, data=data) and trying to test the null that the effect of index1 on y is 0 when gender=1 and am wondering if the following is the correct way to think about setting up this linear combination: linearHypothesis(model, c('index1 + index1*gender = 0'))
I'm confused about the correct way to deal with my data. They are structured as follows: and here is a sample: structure(list(id = c(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6,...
I am trying to estimate a fixed-effects model with user-specified weights and am a bit confused as to how metafor is calculating the standard error of the summary effect. The mean effect of the output is matching what I calculated manually but not the standard error. Below are the weights that I specified and my manual...
For the family, $f_\theta(x)=\frac{e^{-(x-\theta)}}{1+e^{-(x-\theta)})^2}$, compute the fisher information, is it an exponential family, $x\in \mathbb{R},\theta \in \mathbb{R}$? I computed the fisher information as $I(\theta)=E[(\frac{\partial log f_\theta(x)}{\partial\theta})^2]$ $\frac{\partial}{\partial\theta}lnf_...
I made a very simple scenario: Let's assume 'total work time' has a positive association with 'income' (more you work, more you earn). But when I adjust to one of the following DAG's members, what should most likely happen with the association between exposure and outcome? a) work time job1 (mediator) b) colleagues vi...
I'm currently working on analysis of excess mortality during the pandemic as part of my Master's thesis. I am using UK data, from Public Health England, who use a Quasi Poisson model for expected deaths had the pandemic not occured. The methodology for the model and the data are publicly available, though the model par...
can I do welch one way anova to compare mean between the following three groups Group 1 has 83 observations Group 2 has 15 observations Group 3 has only 2 observations And in group 3 the variance is 0 so the welch test cannot be performed, how should I solve this problem? Thank you
For instance, $$X = \begin{cases} Y, & \text{with probability} ~0.3,\\ Z, & \text{with probability} ~0.7, \end{cases}$$ where $Y$ and $Z$ are random variables with known distributions. How does one find the expectation of $X$
Suppose we're interested in the effect $\beta$ of a treatment $D$. To increase the precision of our estimate (ie., reduce the variance of $\hat{\beta}$), we can include a control variable $X$ that explains some of the variance of $y$. Moreover, suppose the control is necessary for ruling out confounding effects from om...
Let's take a series: A: a1 a2 a3 ... an Let's say the standard deviation of the above series is S1 Now let's create B = b1 b2 ... bn such that bx = ax+1 - ax The standard deviation of B = S2 Similarly if we create a series C, D,.. so on with standard deviations S3, S4.. so on. This creates another series S: S1, S2 ... ...
I am trying to find the Moments of the natural statistics of the normal-gamma distribution. $$(X,T) - NormalGamma(\mu, \lambda,\alpha,\beta)$$ I found on its Wikipedia page that the moments of the natural statistics are: $$ \begin{align} E(\ln T) &= \psi(\alpha) - \ln \beta,\\ E(T) &= \frac{\alpha}{\beta},\\ E(TX) &= \...
I have a question regarding my deep learning model, I have trained 2 models with different hyperparameters, the second model got loss results higher than the first model, first model loss = 0.0047057-best second model loss = 0.0075174-best but when it comes to the predictions, the second model predictions are more sati...
How can I reason about compare/contrast variable selection between LASSO running a standard multi-variate regression and setting betas to zero if the p-value is > 0.05 ?
I am trying to generate a random integer that follows this distribution. $$ P(X=k)=p(1-p)^{k-1}$$ for $$ k=1,2,...$$ I tried to use sample with some numbers, but i do not know how to use the distribution.
I have two datasets from different years. They are structured almost identically. One is substantially larger than the other and has more time points. When I prepare a negative binomial generalized linear mixed model for one using glmmTMB and then conduct a multiple comparison (Dunnett's test) using emmeans for each 'l...
Is the picture below an example of univariate time series model since I am observing the same random variable just at different time points? Can joint density be used to explain univariate time series models since we use the same term joint density for models where the same random variable is just observed at different...
I have a template sequence is about a standard product before the test: template = {78, 81, 69, 69, 58, 52, 84} Each element in the sequence is an attribute of the standard product, and the values of these attributes are arranged in strict order. The absolute magnitude of the property values may shift each time they ...
I am interested in getting the probabilities of a player scoring exactly 1 point, 2 points, 3 points etc. Can an ordered logit be used for this? If not what would be the best way to get the probabilities of each value occurring?
My question is related to section 3.2: Bias-Variance decomposition. My doubt is specific to formula for variance (3.47, below), on pg 150 - 151. Background: General formula for variance is: $\begin{align*} variance = E_{\mathcal D} [\{y(\mathbf x;\mathcal D) - E_{\mathcal D}[y(\mathbf x; \mathcal D)]\}^2] \end{align*} ...
I am building a predictive model using a highly-dimensional dataset. To reduce dimensionality and reduce overfitting, I used LASSO regression to select features. ##Train LASSO model xdata <-as.matrix(trainingdata[,2:ncol(trainingdata)]) ydata <-as.matrix(trainingdata[,1]) predictors <- names(trainingdata[,-1]) model.fo...
Assume that $(X_i)_{i=1,...,n},(Y_i)_{i=1,...,m}$ are independent samples of i.i.d random variables. Assume that $E(X_1)=\mu_X,E(Y_1)=\mu_Y, Var(X_1)=\sigma_{X}^2,Var(Y_1)=\sigma_{Y}^2$. Show if $\frac{n}{m}\to\lambda\in(0,\infty)$, then $\sqrt{n}(\bar X-\bar Y-(\mu_X-\mu_Y))\to_d N(0,\sigma_X^2+\lambda\sigma_{Y}^2)...
I'm trying to get an overview of what are the current best practices for detecting unit roots in time series data. The main approach I came across is the Augmented Dickey Fuller (ADF) test, which tests for unit roots in three models: \begin{align} \Delta y_t =& \alpha + \beta t + \gamma X_{t-1} + \delta_1 \Delta y_{t-1...
I would like to figure out why some devices of my company fail. Therefore, I'm able to use a list in which around 300 devices are listed together with about 70 parameters while only half of it is numerical, the others are mostly ok/not ok or quite a bunch of comments. The latter is hard to use for an analysis, I guess?...
Suppose we want to compare the performances of two algorithms — call them A and B — on a problem X. In particular, suppose that we want to evaluate the algorithms on random instances of X drawn from some distribution D. For simplicity assume that Algorithm A is deterministic and that Algorithm B is randomized. Assume t...
I understand independent as the random variable values in a data aren't connected to each other in any way. (q1) Is my understanding ok? data_1: a product which has a design defect has been sold to different countries. (q2) If I collect failure times (assume that all failures are because of the design defect) for those...
What is this about? Suppose I have performed two statistical tests (with a continuous distribution of $p$ values) for the same one-sided research hypothesis on different datasets, yielding the $p$ values $p_1=x$ and $p_2=1-x$. I have no further a priori knowledge that makes a distinction between the datasets, e.g., to ...
I am currently comparing different models for a text classification task using tweets. Some of them are decision trees (random forests) and, since I augment my data periodically, I need to do hyperparameter's optimization quite often. This is why I moved to Bayesian optimization with OPTUNA (in Python), which really sp...
My aim is to understand and describe the effect that independent variables (ordered and unordered factors and continuous) have on a continuous dependent variable. First, I thought about using a stepwise regression with AIC to select the most "important" ones. However, it would be also nice to describe these important i...
I have two categorical variables measuring outdoor time during winter and summer. As I am interested in the overall outdoor time during the whole year, I am thinking about combining the variables. However, the responses are categorical, both variables do have same responses: Time spent outdoor (Winter or Summer): - T...
I heard that the number of meteorites of the given size that hit the Earth follows the Poisson distribution. I am wondering how to estimate the Poisson parameter $\lambda$ and its 95% c.i. if I have only one measurement for a given meteorite size. Let's propose that we are considering 100 year period of time. For that ...
Beforehand Usually, we can get intercept and slope of a linear regression from numbers we get from a covariance analysis of same variables. This goes like this: slope = cov(x, y)/ var(x) intercept = mean(y) - slope * mean(x) For example, if I try this with x = c(1, 4, 17, 20) and y = c(0, 4, 6, 9), I do get same slope...
I have a good-sized data set containing details and outcomes of various types of injury. I've worked through it and cleaned the data as best I can - it's now consistent and complete. At this point I'm focusing on 3 main types of injury: gunshot, stab wound and blunt force trauma (variable values of 1, 2 and 3). Outcome...
Given two variables $a$ and $b$ and two intervals $I$ and $J$, is the following affirmation true? $$ \Pr[a\in I]\geq p\ \land\ (a\in I\implies b\in J) \implies \Pr[b\in J]\geq p $$ Of course, $a\in I$ and $b\in J$ both depend on one or more random variables; otherwise, it wouldn't make sense to speak about probabilitie...
I am conducting survival analysis, investigating the association between a binary factor (TRUE/FALSE) and all cause mortality. I use the rms package: > m <- cph(dead ~ factor, data=dta) > > summary(m) ... Low High ... Effect factor - TRUE:FALSE 1 2 0.14 In my interpretation, this means...
Let $\{\epsilon_{n}\}_{n=1}^{N}$ be i.i.d. random variables with $P(\epsilon_{n} = \pm 1) = 1/2$ for $n=1,2, \ldots, N$ i.e. a sequence of Rademacher distribution. Let $0<p<\infty$ and let $x_{1}, x_{2}, \ldots, x_{n} \in \mathbb{C}$. Then from Khintchine inequality \begin{equation} A_{p} \left( \sum_{n=1}^{N} |x_{...
My question is a bit naive. I'm trying to get the exact & clear meaning of the phrase "predictor variables are fixed and not random in linear regression". According to my understanding, fixed means that we pre-set values of predictors in an experiment and then observe y for those values; whereas random means that while...
I have an ordinal variable (disease severity index, scores = 0, 1, 2, 3) and presence/absence counts (number of people with presence/absence of virus). I am testing whether or not incidence of the virus increases with disease severity. It seems that a trend for test in proportions is appropriate here. There is a base R...
I wanted to forecast student fall enrollment using last 3 years of data. Registration open day for fall differs by year. For instance, Fall registration open day in 2019 was March 10 and ended in say August 22, March 20 in 2020 and ended in August 22, so on! Therefore, for 2019 I have total 155 days of data, 156 for 20...
Let $X_1,\ldots,X_5$ and $Y_1,\ldots,Y_8$ be two independent simple random samples such that $X_i\sim\mathcal N(m = 7,\sigma^2 = 50)$ and $Y_i\sim\mathcal N(m = 5,\sigma^2 = 24)$. Find a real number $c$ such that $(\bar X−\bar Y > c) = 0.3$ Should be an easy problem but I can’t understand if I’m solving it right. How t...
I have read a couple of related questions and their answers, but nothing really fits to my specific case. I have a model like this: model <- lmerTest::lmer( Rating ~ Codition + Gender + Condition:Gender + (1|Study/ParticipantID), data = ..., REML = TRUE, na.action=na.exclude) So, all my predictors, fixed and rand...
I am conducting an analysis looking at trust across a range of 30 countries between 2002-2018. I am using repeated cross sectional survey data. My data is structured so that individuals(level 1) are nested within country-waves(level 2) which are nested within countries (level 3). I have done two level models before but...
My Situation: I should start off with my end goal: I want to get a distance metric between each document and all of the other documents To get there, I first need to encode these topic labels so that they can be appropriately placed in Euclidean space in relation to each other. I don't have the original text of these d...
Pardon my ignorance here. While analyzing data based on multiple cohorts(7 cohorts), if there is one cohort that is contributing very small number of study sample, relative to data from other cohorts, is it worth including that cohort in my analysis. What are the disadvantages of including this cohort ? This is how muc...
I would like to know if exists a rule of thumb to set the $\gamma$ parameter in Focal Loss when we have very imbalanced classes. The focal loss first appeared in Focal Loss for Dense Object Detection by Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, Piotr Dollár
This paper is showing how KL divergence can be minimized by matching the expected values of the sufficient statistics. More precisely, For any distribution p of the exponential family with pdf: $$ p_{\theta}(x) = \frac{1} {Z(\theta)}\exp(\theta^T \phi(x))$$ the distribution $$p_{θ∗} $$ which minimises the Kullback-Leib...
I am looking for help regarding Spearman's Rank test results. I am trying to identify the correlation between 4 variables: age, gender, area (rural or urban) and education level. However, my results are showing weak rho values (-0.049, -0.113, 0.064) but have high p-values ranging from 0.293-0.993. Can anyone explain h...
Given a joint probability density distribution $P(\boldsymbol{\alpha})$ with $\boldsymbol{\alpha}=(\alpha_1,\alpha_2,\alpha_3)$ a variable in $\mathbb{R}^{3}$, such that all marginals $P_i$ are Dirac-delta functions i.e. : \begin{align} P_{1}(\alpha_{1})&=\int d\alpha_{2}\int d\alpha_{3}P(\boldsymbol{\alpha})=\delta(\a...
Hi, I'm quite new to statistics and have been tasked to evaluate if there is a difference in accuracy between 2 subpopulations in a logistic model. The credit scoring company's model calculates the risk credit score (0-1 or 0-100%) of an individual defaulting and then they send this score to the banks who decide if the...
I understand that the standard difference in differences with 2 groups, 2 time periods appears as follows \begin{align*} y = \beta_0 + \beta_1Tr + \beta_2Post + \beta_3 Tr \times Post + u \end{align*} Where $Tr$ is a dummy for being in the treatment group, $Post$ is a dummy for the post treatment time period. However, ...
I am doing a classification task for a 5-class imbalanced dataset. Class distribution shows 2-majority & 2-minority clasess, as far: >>> def class_distrib(arr): ... print('-' * 70) ... counter = Counter(arr) ... for c, v in sorted(counter.items() , key=lambda x: x[0]): ... per = v / len(arr) * 100 ....
I'm using GLMMTMB to build a model that predicts the state of fish stocks based on management attributes. The model contains an AR1 term for each stock and regional and taxon level random effects to control for regional and taxon level variation. I keep going back and forth on if I should include year dummies as a fixe...
What is the difference between vector (x) of features and feature space (X)? I always though that big X was ALL the features and little x was about a specific feature.
Suppose I have a model with latent states $x_1, x_2, \ldots x_T$ and observations $y_1, y_2, \ldots y_T$. I run a sequential monte carlo algorithm to give me the following approximation to $p(x_{1:T} | y_{1:T})$: $$p(x_{1:T} | y_{1:T}) \approx \sum_{i=1}^n W_T^i \delta_{X_{1:T}^i}(x_{1:T}), $$ where $X_{1:T}^i$ is the...
By ill-conditioned regression problem, I mean that the feature matrix $X$ is not full rank. For example, X contains two or more columns highly correlated. If that's the case, $X^T\cdot X$ is not invertible, which means we cannot compute the closed-form solution. My understanding is that we cannot perform Stochastic gra...
I am trying to find a picture (e.g. on Google Images) that illustrates the following concept: The existence of a "true ideal" function that by definition is never fully observable The process of a statistical model trying to "learn" this "true ideal" function based on data points from this "true ideal" function The...
I have a question while I studying PRML - Gaussian Distribution. When completing the square in multivariate Gaussian, in above equation, I'm wondering why
I posted this question on Stack Overflow, but was advised to post it here. I fitted the same data set to a 1PL item response theory model (called onePL below), and then to a 2PL item response theory model (called twoPL) below.. Subsequently, I ran an ANOVA analysis to investigate which model had the best fit (using ano...
I am currently working with a dataset using the QuantregGrowth package in RStudio to determine the 2.5th/97.5th percentile curves of a biomarker across the age spectrum. I have a pretty good handle on this now, but my next step is trying to figure out if there are any sex differences. I was planning to make two separat...
In my research I have 4 independent variables which are gender, BMI, department, and hours spent on computer and two dependent variables which are test scores for two different tests (SSS) and (FSS). The test scores (SSS) and (FSS) and the independent variables were obtained from the same population which is 100 studen...
If a binomial logistic regression model is being used strictly to identify variables that have an impact on the dependent variable but is not being used to make predictions, are underdispersion and over dispersion still an issue?
Does any definitive work exist, e.g. a review, a book chapter, or a book, on the advantages and disadvantages of existing approaches? Is there a consensus on which approach is the right one? I have come across three approaches so far: We test by a statistical test whether a given assumption of a statistical test is me...
Let say I have a regression equation $Y = \beta_0+\beta_1x_1+\beta_2x_2+\epsilon$. Estimate of the response value can be obtained as $\hat{Y} = \hat{\beta_0}+\hat{\beta_1}X_2+\hat{\beta_2}X_2$. And I also build a 95% confidence interval for $\hat{Y}$. I try to understand how should I interpret that confidence interval ...
apologies if this question is obvious. I am trying to determine what type of analysis I should run for an observational study I am doing. The variables are sleep (sleep deprivation <7 hours or adequate sleep 7-9 hours), physical activity levels (level 1-4, increasing levels is more activity), and diabetes prevalence (t...
Given two OLS, I'd like to calculate the effect size of different coefficient from same predictor from two regressions. What would be good method to calculate the effect size?
A mixed model can be recast as a ridge regression for a specific regularization parameter $\lambda$ that penalizes only the random effects -- aka dummy variables for the grouping levels. Fitting a model this way might be appealing if one desires to pick $\lambda$ based on cross-validation, rather than assuming that the...
I work in finance and wanted to ask a quick question regarding standard deviation of data sets. I have collected data sets over the last 10 years and would like to use them to make a prediction for the coming year. The question I want to answer is, what the value that has a 95% probability of not being exceeded is? As...
I am working on a behavioral model which predicts the probability of default (PD) during the next 12 months for an existing customer with an outstanding loan. My dataset consists of monthly snapshots of customers including their payment behavior based on which we want to predict the future payment behavior. The dataset...
I am reading the paper Bayesian Shrinkage Estimation of the Relative Abundance of mRNA Transcripts Using SAGE, and I am trying to work out the calculations for the complete conditionals for the Gibbs scheme presented in Section 3.5 (the prior structure is described in Section 3.1). I am confused about how to calculate ...
I conducted a toxicology study where I exposed fish to 6 concentrations of an effluent treatment for 10 days. At the end of the experiment, I measured 10 endpoints with the fish plasma to determine effects of treatment. After collecting the data, I ran a Principal Component Analysis on all endpoints. PC1 here is a prin...
Context I'm doing a field intervention, with 4 treatments and 1 control. I have done a stratified randomization beforehand to ensure that demographic characteristics (gender, age, income group) are evenly distributed across my treatment and control cells, i.e., I don't have a scenario where Treatment 1, for instance, i...
Let $X_1, · · · , X_n$ be a random sample from the uniform distribution on $[0, θ]$. I want to get the variance of the maximum likelihood estimator of $θ$ and check whether the variance decrease at the rate of $1/n$. Besides, whether the Cramèr-Rao information bound hold in this case. For the first part, I got $$L(\the...
In this video: https://www.youtube.com/watch?v=IK67f3IItfw at 4 min mark, Dr. Aric LaBarr shows an example of the following model: $ARIMA(1,0,1)(2,1,0)_{12}$ his resulting equation is: $W_{t}=c+\phi_{1}W_{t-1}+\phi_{2}W_{t-12}+\phi_{3}W_{t-24}+\theta_{1}\epsilon_{t-1}+\epsilon_{t}$ I tried to crossvalidate with my own ...
I'm a little newbie at statistics, so I'm sorry if my question is too dumb. I'm working with compositional datasets with several chemical elements (continuous data; arranged in columns), but also some categorical, multiclass data. My interest in my study is to run, test, and tune different classification algorithms usi...
I'm doing logistic regression where X has four factors (1-4) and Y has two factors (0-1). I did: model=glm(formula=y~x,family=binomial(link=logit),data=data) #x=='1' is reference level summary(model) I get: Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.6...
I was wondering if there is a standard way to rank cases by multiple variables. When we have only 1 quantitative variable, the ranking is trivial, you sort the cases by comparing the magnitude between cases, ordering them by that value in increasing or decreasing order. Because there is only one component, this ranking...
How can I generate survival data according to the specified models?
I'm currently building some Bayesian models with the brms package and the default intercept prior is student_t(3, 0, 6.3) and so I'm looking to visualise the prior predictive distribution from this prior. Typically I would just use functions like rnorm or unif depending on the distribution; however, the rt function onl...
I'm testing to see if Inflation has a unit root and if it has a drift and trend, just drift or no drift and trend. My results from the ADF test looks like this: # # # # # # # # # # # # # # # # # # # # Augmented Dickey--Fuller test # # # # # # # # # # # # # # # # # # # # type: trend drift none AR1: 0.86 0.86...
I am studying causal discovery, with an interest on constraint-based algorithms like FCI (Fast Causal Inference). I want to know what's the Maximal Ancestral Graph (MAG) of this underlying DAG (example taken from Fig-1 in Jiji Zhang et,al) In this DAG, $\textbf{O}=\{A,Ef,R\}$ is the set of observed variables, $\textbf...
I am working on a binary classification problem using random forests, neural networks etc with dataset size of 977 records (class proportion of 77:23) I used balancedbaggingclassifier with random forest to obtain the predictions. My model gave an AUC of 81% (and f1-score of minority class is 60% only but biz is okay wi...
I'd like to do multiple regressions of test scores against a few continuous variables (e.g. age, clinical measures) but the test scores are discrete values (1-10 or 1-50). The function I wanted to use in Python didn't work because the outcome variable was assumed to be categorical, but in JASP I just set the variable ...
I'm trying to estimate a difference-in-difference model with pooled cross-sectional data. The dataset consists of rental prices in one city for the years of 2011-2021 and includes a wide range of other variables (e.g. living size, lift, heating etc.). I added a dummy variable "braked": 0 if the dwelling is in the contr...
What is the type of the left variable if this is not an instrument or conditional instrument? Is it just a covariate? Moderator?
Consider this linear equation: $$ Y \sim \beta_0 + \beta_1X_1 + \beta_2X_2 + \beta_3X_3 + \beta_4(X_2*X_3) + \epsilon $$ where $Y$ is what I'm trying to explain (it happens to be the evolved growth rate of a species growing and evolving in a community). $B_0$ is the intercept. $X_1$ is species richness, modeled as a c...
I'm preparing a time series model with LSTM, I noticed that the time series data is not stationary so I used diff(period=1) in pandas. I fitted the LSTM model and it looks good. I invert the difference operation using original data. When we are forecasting in real time, how to invert the predictions because the origina...
Let's assume there are 4 time points, t0 (baseline) ... t3 At each time point I assess a % of successes of some outcome: p0, p1...p3. The denominators vary over time, so the counts itself do not suffice: n1/N1, n2/N2... n3/N3. The data are repeated observations - the patients are assessed, so within-subject covariances...
my problem is the following. Consider only Bernoulli random variables $X_1,\dots, X_n$ where $P(X_i = T) = p_i$ ($T$ stands for true, success). All the r.v.s are independent. Starting from the simplest case, consider 3 r.v.s $X_1$, $X_2$, and $X_3$. Define $Z$ as follows: $Z = X_1 \cdot X_2 + X_1 \cdot X_3$. Then, I ca...
I have a time series with observations over the span of minutes, hours or even days. I'm interested in knowing if is better to use a daily, weekly or monthly version of the original time series, which I can produce by aggregating the original values. In synthesis, 5 models were fitted over the 3 time series (daily, wee...
This plot shows hourly time series data of a households power usage. The house is only occupied for short periods. What simple alg. or technique can I use to find the start of these irregularities? The amplituede of these irregularities will mostly by above the mean of the previous hours, but the duration can vary. Als...
I want to discuss a strategy to determine what is the largest number of a random sample. The strategy presented below may not be optimal. The problem Suppose that we generate a random sample of $n$ distinct numbers from $0$ to $1$ according to a uniform distribution. The sample generated will be labeled as $I = \{d_1,....
I'm trying to solve the Travel Salesman problem for multigraph. Namely, I have a fully-connected graph with 2 oriented edges between every pair of nodes. The weight of the edge from x to y corresponds to the distance from x to y, but dist(x, y) != dist(y, x). The number of nodes is around 40. Every node should be visit...
I have three independent catagorial variables and two dependent continuous scale variables, so I want to compare means across these three independent catagorial variables. I think here the best choice would be three way manova, but I'm facing problem with my dependent continuous variables for example one of the depende...