instruction
stringlengths
9
38.7k
I have data that is reasonably assumed to be iid samples from some distribution. Our goal is to put a confidence interval on the population variance. Notationally, we have IID $X_i, i = 1, ..., n$ with mean $\mu$, variance $\sigma^2$ unknown. Sample size $n$ varies from 200 to 20,000. Let $S_n^2 = \frac{\sum_i (X_i -\b...
I'm trying to explain a time-varying country-year count variable of an event (Y) with both time-varying and time-variant variables (X); I have data of a around 100 countries for 20 years (2000-2020). I'm running a negative binomial regression with random country intercepts; corresponding to the R formula Y ~ X1 + X2 + ...
In a package to write linear regression models I have found the following description: dependent variable ~ exogenous variables + (endogenous variables ~ instrumental variables) + fe(fixedeffect variable) Can you explain the role of the various type of variables, in particular the difference between endogenous and exog...
In the Rasch model, the reliability of separation can be calculated as 1 - (MSE / SD^2), where SD represents the standard deviation of person location measures on a logit scale, and MSE refers to the mean squared errors of item location measures. What confused me is how to compute MSE and what it signifies. Is there a ...
I'm trying to interpret a coefficient of a glm model with the gamma family and the identity link function. The outcome is continuous, positive and right-skewed. Transformation did not yield a normal distribution. My model looks like this: model_glm_gamma = glm(outcome ~ var1 + var2 + var3, data = data, family = Gamma(...
My study is a retrospective one group pre-test post-test on multiple variables. Not every patient in the study had scores for all of the variables, so as long as a patient had both a pretest and a paired posttest, the pair was included. That left different paired totals for each variable. I'd like to conduct a paired t...
I have an imbalanced treatment group and a control group. I want to use Matchit in R to calculate propensity scores and get balanced groups. However, there are several parameters I have to set in the Matchit package, for example, method, ratio, distance, and caliper. Each of these parameters has several options, for ex...
Null Hypothesis Significance Test (NHST) is a class of statistical tests that comes from blending procedures from Fisher’s Significance Test and Neyman & Pearson’s Hypothesis Test (see, e.g., Lew (2020)). Many have derided its mere existence (see Cohen (1994)), but it is nonetheless commonly applied across many fields....
Many outstanding answers here detail the fundamentals of linear discriminant analysis. These include descriptions of its use in dimensionality reduction, an explanation of classification using Bayes' rule, and a description of within- and between-class scatter matrices. Common methods for measuring importance of disc...
We have single cell data from 12 control and 12 diseased individuals. The data has been integrated (remove batch effects) and clustered. We would like to know if there are any clusters that are enriched/depleted in disease versus control. I read a paper that said they accomplished this using the fisher exact test. T...
I've implemented a simple one sample t-test in python: import numpy as np from math import sqrt from scipy.stats import t, ttest_1samp def one_sample_ttest(sample, global_mean, alpha=0.05): n = sample.size std = np.std(sample) mean = np.mean(sample) serr = std / sqrt(n) tscore = (mean - global_mean...
For what reason should I think about changing the total score of a scale if I allowed residual covariances for similar sounding items? If I still work with all of the items should I think about changing the total score?
This is for a simple survey dataset- the client has sample goals on two levels- one for group A vs group B. Another for group X vs group Y. So we have 4 weights affixed to each of these groups. The trouble is a particular respondent could be a part of group A as well as group Y. How can I combine weights for respondent...
I am trying to figure out the best approach for my prediction task. I have a dataset with four variables: year ranging from 2010 to 2022, categorical variables $A$ and $B$, and numeric target variable T. I have numeric data that describes each category in $A$ and $B$, and can be used as embeddings for these instead of ...
Suppose I have a connected, undirected graph with edge weights, and I do a random walk over it such that the probability of moving from any node u to one of its neighbors v is equal to the weight of edge (u,v) divided by the sum of the weights of the edges incident to u. Is there a closed form for the mean and variance...
Say I ask people via survey, "Pick your one favorite option: A, B, C, or D." What is the proper way to compute pairwise significance between the answer options? Can we say whether there is a statistically significant difference in the rate that users picked A vs B, or A vs C, etc?
Theoretically in Bayesian inference one could use one experiment's posterior as another experiment's prior, such that knowledge of the parameters accumulates from $p(\theta) \rightarrow p(\theta|\mathbf{X}_{1}) \rightarrow p(\theta|\mathbf{X}_{1}, \mathbf{X}_{2}) \rightarrow \ldots$ But in practice, of course, this is ...
I was using a multivariate gaussian (mgaussian) glmnet model to solve the multitask learning problem below (deconvolution of a multichannel signal using a known point spread function / blur kernel by regressing the multichannel signal on shifted copies of the point spread function) but I am experiencing poor performanc...
For the first question I calculate the sample correlation coefficient, so r=0.3987866 then I calculate t=1.229972759 and as |t|<2.306 (which is the t-critical) we don't reject the null hypothesis (H0) at the 5% level. Therefore, there is no significant dependance between the lead and iron levels. For question (b), we ...
I have two one-dimensional samples that I'm trying to quantifiably distinguish (or deny such distinction). I.e. the null-hypothesis is that they come from the same population (distribution?). The alternative is that they don't. So after some reading I figured that K-S test is what I need. In order to implement it, I'm ...
I am very excited to be on this forum. I am new to biostatistics and have a question regarding my case-control study, for which I am using STATA for data analysis. All my patients are diabetic. Some are on Metformin, and some are not. Likewise, some have respiratory infections, and some don't. My cases are diabetic pat...
I am using the Chow test to analyze structural change in time series data potentially caused by a significant event. Since each data point represents a day, the data is broken into two chunks: Chunk 1: All data occurring before the event Chunk 2: All data occurring on and after the event. This is working fine, but I al...
I am watching a tutorial on using mel spectrograms to classify the audio's genre via CNN. My question is why apply local min-max normalization to each individual mel spectrogram? What I mean by local is that the min and max value is calculated from the individual mel spectrogram and then min-max normalization is applie...
This might be a stupid question, so bear with me. I was wondering if embeddings can be used to anonymize input text. I couldn't find any information online that says that embeddings can be 1:1 decoded back to the original text. An example: A user wants to check some metadata about a query with an external API, but does...
Definition: I have conducted research on EEG signal classification, specifically focusing on distinguishing between two different classes using raw EEG signals. Data availability poses a significant challenge in the EEG domain, which necessitates the implementation of data augmentation techniques. In my case, I have ap...
I did an experiment where I have ten different treatments, with six replicates each. I noted the survival of my animals from Day 4 to Day 12. Each replicate had 12 animals so I noted how many survived each day. I don't have individual data for each animal. So my data looks something like this: Treatment Replicate ...
I'm currently learning Convolutional Neural Networks and am stuck on trying to figure out how to compute gradients in a layer that uses transposed convolution. Also, how do I calculate the gradients if I use padding=1 and stride=2? Thanks to this article "https://hideyukiinada.github.io/cnn_backprop_strides2.html" I wa...
I am trying to recreate Figure 6 from Heffernan-Tawn (2004) A conditional approach for multivariate extreme values using the same datasets as used in the paper. The original time series data of air pollutants is available from here. Taking just winter samples of NO and NO$_2$ (Fig. 6 (a)) as examples and referring to t...
Assume $N$ measurements of the same parameter, i.e. a surface temperature $\vartheta_\mathrm{surf}$, were obtained using one single measuring chain (temperature sensor, cables, ADC ...). Furthermore, the uncertainty of each single temperature reading $\vartheta_\mathrm{surf,i}$ ($i = 1 \dots N)$ was estimated as $u(\va...
i have the following problem: I have a sample of individuals who have opinions on certain subjects. I have to group these individuals randomly in groups the same size for every subject and take the mean opinion as a variable in my regression. Some subjects however, have more opinions than others, so i set a the group s...
I have conducted a survey where respondents had to allocate 100 points over 3 choices. There were 8 questions like this in total, where the choices were the same but the attributes on the choices were different. The independent variables I have are gender, age, highest education, money spend per week on groceries and d...
Two sample t-test Consider the following t-test Let $x_1, \dots, x_n \sim N(\mu_1,\sigma^2)$ and $y_1, \dots, y_n \sim N(\mu_2,\sigma^2)$ be independent samples. Let's define The raw effect $\begin{align}\theta = \mu_2-\mu_1\end{align}$ The estimate of the raw effect $\begin{align}\hat{\theta} = \bar{Y} - \bar{X} \si...
Moving window statistics (see this, for example) are sample statistics calculated over moving/rolling windows over a time-series. For example, given the time-series $\{x_1,x_2,\dots\}$ one can construct moving windows of width $W$ and calculate statistics $S(\mathrm{window})$ like this: $$ \begin{matrix} x_1 & x_2 & x_...
An Introduction to Statistical Learning with Applications in R 2nd edition by Hastie et al. says that Statistical learning refers to a set of tools for making sense of complex datasets. How is it different from Machine Learning then? Is Machine Learning a subset of Statistical Learning?
IBM says that: Deep learning is a subset of machine learning, which is essentially a neural network with three or more layers. Therefore, the question is, is there anything called Shallow Learning that uses less than three layers of an artificial neural network?
If the correlation was significant enough (however you define it), does it necessarily show that there is some underlying cause even if it's not direct causation?
I'm creating a epidemic simulation program in Python, but I'm stuck trying to determine the probability of being infected (if exposed). I have an m x n grid with 0's and '1 (0's represent healty cells, 1's represent infected cells). For simplicity i'll use a 3x3 grid for this example. 0 1 1 0 0 0 0 1 0 The ...
I have a sample of data in R looking at vendors and I would like to compare the % of vendors which sell a product for each vendor type, as in the table below: I have further data for which I want to calculate the same sort of proportions, but also for 4 different towns. From an overview it seems like some of the categ...
I have a model of some financial data that achieves an R2 of ~0.01 (1%) using RidgeCV -- this is about what I expect. I'm exploring building the equivalent model using SGDRegressor so I can leverage partial_fit to do incremental training over larger than memory data sets... Unfortunately my SGDRegressor does not conver...
Edit: Shared my solution as an answer here Our goal is to determine optimal cut-off test scores for course placement. The course placement has already been manually assigned to each test-taker. The goal is to replace this manual labor with the calculated cut-off test scores, so that a future test-taker from a similar g...
I've been trying to solve the following exercise: -> Consider a dataset with two points in 1D: (x1 = 0, y1 = −1) and (x2 = √2, y2 = 1). Consider also the mapping to 3D φ(x) = [1, √2x, x2]. a) Find the optimal weights w0. Hint: recall that the separation margin between the two classes is ρ = 2/||w0k|| b) Find the optima...
I am unclear on how the R2 output from adonis2 is interpreted. Is it that a particular factor "explains" the differences in community composition? And thus, would R2 be interpreted as typically is in univariate analyses?
Suppose $X$ is a $d$-dimensional random vector. The coordinates follow an auto-regressive structure: $$ X_{1} \sim N(\mu_1,\sigma^2_1), \qquad X_{j}|X_{< j} \sim N(a^T_j X_{<j},~ \sigma^2_j), \qquad a_j \in \mathbb{R}^{j-1}, \qquad 2 \le j \le d, $$ where $X_{<j}$ denotes the vector containing the first $j-1$ coordinat...
Let's say I want to flip a coin a billion times and count how many heads I get. But I don't have time to actually flip a coin a billion times. Assuming I have a random number generator than can generate a number between 0 and 1, is there a technique I can use to simulate the outcome of 1 billion random coin tosses, suc...
I have contradictory output when using R survival analysis predictions with the "response" type. I coded the following and ran: y <- rweibull(1000, shape=2, scale=exp(4)) e <- rep(1, 1000) mean(y) # 49.50 median(y) # 46.40 library(survival) model <- survreg(Surv(y, e) ~ 1) summary(model) predict(model, type="re...
There are many real-world phenomena in which a variable of a population follows the Pareto distribution. I am wondering, what are the sufficient conditions for the distribution to be Pareto? And if it is possible to go further, what are the necessary and sufficient conditions? I am wondering if there is anything analog...
Let $X_1,X_2,\ldots$ be an infinite list of independent normal variables $X_i\sim\mathcal N(0,1)$, for $i=0,1,\dots$. Consider the the sum $$Y=\sum_ir^iX_i^2,$$ where $r\in(0,1)$ is a parameter to weight (geometrically) each term in the sum. By definition, for each random variable, we have $E[X_i^2]=1$. It's straightfo...
Trip Days Expenses Expenses per day 1 0.5 13.50 27 2 2.0 12.00 6 3 3.5 17.50 5 4 1.0 9.00 9 5 9.0 27.00 3 6 0.5 9.00 18 7 8.5 17.00 2 Total 25.0 105.00 70 Question: The following data represents travel expenses ( other than transportation) for 7 trips made during november by a salesman of smal...
Consider the following simple linear regression model: $$ y = \beta_{0} + \beta_{1}x + u $$ Let's say that the dependent variable, $ y $, is yearly salary, for which the unit is dollars per year. Let's say that the independent variable, $ x $, is education, whose unit is years. What is the unit of $ \beta_{1} $? Is i...
Having a model with a higher log-likelihood and lower explained variance doesn't make sense to me. The Bing AI thing says it's impossible... I'm new to these analyses and the log-likelihood statistic. The difference is so tiny (see below) I'm tempted to call it a rounding error, but I'd like to better understand what...
Given an image to train on a CNN what would be considered the features that are the inputs of the model? Would each individual pixel be a feature or would the R,G,B channels be the features? Lets say I have a 28x28 image with R,G,B channels. Would I say the neural network takes in 28x28 = 784 features, 3 features due t...
Using the above DAG I need to simplify the following conditional probabilities: $$i) \quad p(x_4|x_1,x_2)$$ For this one I guess I can just remove the conditioning on $x_1$ (using the DAG) and the most simplified conditional probability would be $p(x_4|x_2)$ $$ii) \quad p(x_4,x_5|x_1,x_2)$$ Again removing the conditio...
For my research, I'm calculating the required sample with G*Power, using effect sizes estimates. I have 1 scale dependent variable and a 4 x 2 design. I especially care about comparing 1 group to the other 3, which is why I'd like to divide the participants into the groups in ratio 4:2:2:2. I can integrate interaction ...
I would like to ask you, how to correctly interpret different results for different number of lags in arch.test (R)? We reject the null hypothesis (homoscedasticity) up to 12th lag but after that we fail to do so. So, what does it mean that our time series looks homoscedastic (no ARCH effects) for lags=4 and 8, but for...
I'm trying to come up with some sort of statistical model to predict how likely an athlete would be to place in a track and field event (e.g. 100m run) based on their time. I was thinking it would be more simple just to predict that they place (i.e. typically top 3) rather than predicting an actual place. For example, ...
Suppose there are $T$ variables $\{x_1, x_2, ..., x_T\}$, and they have the following relationship $$ p(x_t|x_{t-1}) = N \big( x_t; \sqrt{1-\beta_t}x_{t-1}, \beta_tI \big) $$ that means there is a Gaussian distribution relationship between 2 adjacent variables. Then how to derive $p(x_t|x_1)$? My question originates fr...
I’m conducting a RCT to test if a new type of device (“test device”) is quicker than the device used now (“control device”). The problem is though, that we don’t now what the mean time for the control device is, and we have no way of testing it (no ressources for a pilot study before the RCT either). We know, however, ...
The pair of random variables $(X, Y )$ is distributed as follows. $Y$ has probability mass function $\text{Poisson}(1).$ Given $Y , X$ has probability mass function $\text{Poisson}(Y ).$ Show that the probability generation function of $ X + Y $ equals: $$G_{X+Y}(s)=\exp[se^{s-1}-1]$$ I tried to do the following: $$G...
Can anyone explain what is the difference between $(\bar{e_1} - \bar{e_0}) $ and ${E(\bar{e_1 }) - E(\bar{e_2 })}$? I know they are both selection bias, but what are the differences? Why do we say that we allow individuals to self-select into treatment and control then ${E(\bar{e_1 }) - E(\bar{e_2 })}$ is the selecti...
I am working on a multimodal classification task in which Image-Text is inputted in pairs. The number of train data in each label is different, so I'm trying to solve it by augmenting the data. Is there a python library or code snippet available in this situation?
I have a set of patients (n=27) that all died from a tumor. They all underwent surgery by the same surgeon. And all of them had their tumors removed by different percentages. They all received the same chemotherapy regimen. Patients Tumor percentage Survival Days A 2 350 B 10 120 C 50 60 I'm trying to f...
Scikit-learn says: If smooth_idf=True (the default), the constant “1” is added to the numerator and denominator of the idf as if an extra document was seen containing every term in the collection exactly once, which prevents zero divisions: idf(t) = log [ (1 + n) / (1 + df(t)) ] + 1. But by Laplace smoothing, shouldn...
I have a sample made of several disjoint cuboids. Within each cuboid, I have cells entirely contained in the cuboid and fragments (intersecting one or more faces, so their total volume is unobserved). Cells are of different forms and sizes and lie in random positions and orientations. There are in each cuboid far more ...
I am conducting a research question where I need to analyse some data. To do this I was thinking of doing a linear regression, so I tired to model the residuals to check for linearity. I do not know how to interpret the results. Is it linear? It is meant to be distributed evenly, be random and have no curvature.
I'm trying to fully understand Variational Autoencoders (VAEs) 1 and their math but one part keeps confusing me and I hope someone can give me in an intuitive explanation what I am missing. Here is how I understood it and where I am getting confused: The overall loss consists of 2 parts, the regularization loss and the...
Consider a fair roulette game with 18 red numbers, 18 black numbers and 1 green zero. At each round, the probability of winning by betting on red or black is 18/37, which is 48.6%. If we play a lot of rounds and count how many sequences of N consecutive colors are drawn, we'll see that there are fewer sequences as N gr...
I did an experiment to look at the influence of two categorial variables onto a categorial output. The input variables were T and P. The output variable is R. Sample size is 188 data-points. I did a $\chi^2$-test for T and R. The result for Pearson's $\chi^2$ was significant with $\chi^2(4)=122.39, p=1.65e-25$, Cramer'...
In survey statistics, it is common to estimate sampling variance for a sum using a quadratic form. For example, I want to estimate the number of people in the U.S. who have been diagnosed with a certain disease: my estimate is a sum of observations in my sample. $$\hat{Y} = \sum_{i=1}^{n}y_i$$ To estimate the sampling ...
In the preface to the first edition of his book The Nature of Statistical Learning Theory, Vapnik makes the following comment: Between 1960 and 1980 a revolution in statistics occurred: Fisher's paradigm, introduced in the 1920s and 1930s was replaced by a new one. This paradigm reflects a new answer to the fundamenta...
I have a simple question concerning my methodology. I'm building some algorithms of machine learning to predict a binary outcome, using mlr3. I optimized my different learners (svm, ranger, glmnet, xgboost, rpart) on the train + validation sets. Now, I'm trying to understand the influence of the feature selection on th...
I'm searching for the number of matches of a three nucleotide sequence (GTG) in a window of 9 nucleotides located at a certain position in a large number of DNA fragments. I want to answer the question: What is the probability of seeing results as high as the results I'm seeing. Based on empirical computation (using 1 ...
Suppose there are two regression models, $(i = 1,2,\cdots,500)$ Model 1) $ y_{1i} = \beta_0 + \beta_1 x_{1i} + \epsilon_{1i}$ Model 2) $ y_{2i} = \beta_0 + \beta_1 x_{1i} + \beta_2 x_{2i} + \epsilon_{2i} $, where $$ \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \sim N\left(\begin{bmatrix} 10 \\ 20\end{bmatrix}, \begin{bmat...
I am interested in explaining the version of Fisher's tea tasting lady example that is discussed in Lindley's (1993) 'The Analysis of Experimental Data: The Appreciation of Tea and Wine'. A similar question has been raised here: Reproducing a didactic example of Lindley (1993) A lady claims to have the ability to taste...
I'm trying to fit a model to some data in R. To simplify the question, I'll use an example. If the model that describes my process is y = f(a, b) where a cannot be greater than b. Is there a way I can fit the model with this restriction? I'm using nlsLM but am open to other methods/packages if necessary.
In their 2000 paper "Making the Most of Statistical Analyses: Improving Interpretation and Presentation", Gary King et al. present a method of using simulation to compute quantities of interest and their uncertainties. As an example: Assume that we want to calculate an approximate 95% confidence interval for the inflec...
I am stuck in the exercise 9.3 in the book "An Introduction to the Bootsrap" of Bradley Efron and Robert J. Tibshirani published in 1993. Here is the exercise statement: "Show that formula (9.17) gives formula (5.4) for the standard error of the mean." The formula (9.17) is the following: $$ se(\hat{\beta_j}) = \sigma_...
Consider the continuous distribution with density function $$ p(x) = \frac{1}{2}\cos(x) \;, \quad -\frac{\pi}{2} < x < \frac{\pi}{2}. $$ I want to derive the cumulative distribution function for this density function. In other examples I've seen, this is usually done by taking the anti-derivate of the density function ...
This question is a follow-up to this prior question on here from a week ago which was itself a follow-up to this prior question. Here is a link to the GitHub Repository for the project. I am running N LASSO Regressions, one for each of N datasets I have in a file folder to serve as one of several Benchmark Variable Sel...
I am working on an experiment which detects signals as a a function of time. There can be a trigger, but no signal (0) or a trigger with a signal (1). We are interested in how the ratio (likelihood of getting 1) changes over time. In order to study this we need to group the data. If I group the data points in groups of...
My Data: Respondents were asked to evaluate the quality of two products on a scale of 0-10. There were 12 criteria that constituted the grading scheme, and I would like to analyze the scores overall (as an average of the scores across all the criteria) and per criterion. Each respondent assessed both products. There we...
I'm using a linear mixed effects model to analyze the reaction time of learners of English as a Second Language (ESL). I have two factor variables: grammaticality (grammatical v.s. ungrammatical) and finiteness (finite v.s. nonfinite), as well as one numeric variable: proficiency. I'd like to analyze how their proficie...
I have preformed two-sided Kolmogorov-Smirnov test pair-wise across 6 datasets. It performs as expected (p-value <<< 0.05 in most cases, p-value=1 for identity), except for one pair where it assigns the p-value == 1 for two very distinct distributions as shown below: The results of conducting the test are KS test less...
I'm doing a DOE style analysis on a small amount of data that is two-factor with two levels. I've followed steps I've learnt from the ASQ and got a graph and values for the effect of my two variables and the combination. During a meeting with another company I saw that they had done a similar analysis, but had standard...
Let's assume we are given an $n$-dimensional smooth curve $\gamma:[a,b] \rightarrow \mathbb{R}^n$ and $N$- sampled points $\{x_1,...,x_N\}$ of that curve. Now we use linear interpolation (or a higher order method) to get the curve $$l:[a,b] \rightarrow \mathbb{R}^n.$$ My question is the following: How can we estimate t...
I am researching the effect of temperature on the water-resistant properties of paper by measuring contact angle and water absorption. How can I determine the best and worst temperatures using the values from the two parameters? Thank you.
Im currently hyper parameter tuning my model and returning the model with the least amount of error. Before I start the hyper parameter tuning process I ensure my validation and test data is is weighted correctly by removing columns they may occur the most. This is that code #Get the weight vali_weight = np.unique(y_va...
When computing FFT of a finite-time discrete sample with a non-zero mean, I get two different results depending on the order of operations: whether I zero-pad and then subtract the mean or subtract the mean and zero-pad afterward. What is the right way to go? As a by-question, I'd be grateful for any reference regardin...
I have a dataset with multiple response variables (clinical measurements such as BP, HEIGHT, WEIGHT) and samples are paired because same measurements are taken before and after treatment. And duration of treatment divides the sample into 3 groups (3 months, 2 months and 1 month). I want to extract meaningful informati...
I am interested in calculating the distribution of a conditional expectation, I would like some help figuring out if I am on the right track. Consider a variable $x\sim f(x)$ and a noisy signal $s$ of $x$ drawn from $g(s;x)$. Consider $E(x|s)$ computed using Bayes' rule. I am interested in the distribution of all possi...
I am just now exploring the world of multilevel modeling and I am wondering how to contextualize MLM within the broader toolkit of causal inference techniques. In one of my graduate econometrics course, I was taught the fixed effects v. random effects dichotomy that Huntington-Klein helpfully breaks down and criticizes...
I need your help with a problem that I noticed and I don't know the solution (I am not from statistics). In sum, I would like to create a measurement instrument that is adaptive in that respondents can self-select the interactions they had with a company and just answer their multidimensional experiences about these sp...
I'm training my LR right now and using Brier Score and ROC AUC as my evaluation. In my x_train are binary variables, ordinal variables and numerical variables with a wide range (e.g. 20000 - 160000). After using this code: scaler = StandardScaler() x_train_standardized = scaler.fit_transform(x_train) x_test_standardize...
I have several short (n=12) time series on which I am trying to conduct Augmented Dickey-Fuller tests, but I am getting very different/unexpected results: import numpy as np from statsmodels.tsa.stattools import adfuller import matplotlib.pyplot as plt series1 = [0.41625778, 0.40488883, 0.43044564, 0.44369687, 0.46613...
I’ve been curious about a synthetic control inspired design and wanted to get some feedback. Vanilla synthetic control: Takes a treatment group and a control group then infers some optimal weighting of each control unit (0.25A + 0.75B) such that the treatment group and synthetic control group are negligibly different. ...
I'm running SEM in lavaan, but my model seems not fitting correctly based on the chi-square value and it's p-val = 0.000. When i look at other fit measurements, the model is close to fit well. Below is my model, can someone help me out to interoperate my results? Based on this information i have information to say that...
I am interested in analyzing data from the World Values Survey; the WVS has different waves, however each wave has a single time point. Participants are not the same between waves but the survey questions overlap to a large degree. I am primarily interested in analyzing relationships between individual questions (i.e.,...
Suppose I wish to compute the energy contained in a given frequency range using FFT. So, first, I compute FFT and take the squares of the absolute values of $x_k$. Can I then use discrete integration over the frequency range of interest, or there are some more specific schemes? Can I improve the result by using zero-pa...
Several sources indicate to use Z = lnRR/((SE)(lnRR)) to determine the P value for testing measurements of Relative Risk. I have been unable to find the origin of this approach. Is this an appropriate technique?
I am running a binary LASSO logistic regression using glmnet. The initial data I work with is raster spatial data. When I create an ROC (AUC ~ 0.72) curve based on the test data, the resulting curve appears to curve early and has a very strange shape (shown below). Does anyone know how I can interpret this curve and ap...
Below is part of a report comparing two items, A and B. The goal is high readability. People with little statistical knowledge needs to be able to read this report and quickly understand key differences between the two datasets. Statistically insignificant items were reported as "Same" Statistically significant items ...