instruction
stringlengths
9
38.7k
I originally posted this question to StackExchange and was requested to move it here, as it relates to domain knowledge rather than code writing. I’ve been playing with the theilslopes() function in Python to determine if the trends in two datasets are significantly different. While exploring this question I thought it...
Hi Stack Exchangers, Reaching out for clarification on two different ways to derive B0 for a best fit line using OLS. Are they related? From MIT Notes, B1 is defined as the minimum sum of squared residuals (sum of X and Y from their respective means as a ratio to the spread of X from the mean_ From Khan Academy, B1 is...
I have a gridded dataset of monthly precipitation and would like to analyze the variability of extreme rainfall. However, aside from looking at the overview of basic statistics (mean, standard deviation, max and min amount of rainfall), I don't really know how to start seeing the picture of the variability of extremes ...
A "genotypes - phenotypes blood" question I am working on is In a family, Both father's and mother's blood phenotype is A. Assume the event X is both father's and mother's blood genotype is AA. the event Y is only one of their kids blood phenotype is A. Then what is the probability $\mathbb{P}(X|Y)$? Here is my analy...
I am trying to train an autoencoder on tabular data containing categorical data. After training AE, I use the encoder for classification. I normalize numerical data and use one-hot encoding for categorical data. There are some works that improve the representation in encoder using some kind of augmentations like adding...
Let $X_1,X_2,\ldots,X_n$ and $Y_1,Y_2,\ldots,Y_n$ be independent random samples from $N(\mu_1,1)$ and $N(\mu_2,1)$ populations respectively with $\mu_2\neq0$. I need to find an unbiased estimator for $\rho=\frac{\mu_1}{\mu_2}$. I've been trying to combine both distributions in different ways but haven't gotten anything...
(1)So here is a formula that describes CLT I found at https://en.wikipedia.org/wiki/Central_limit_theorem. According to the first part of the explanation, n as in Xn describes the number of samples(i.e. how many times we samples)we draw from the population. However, according to my understanding of the CLT, the distri...
The Graybill–Deal estimator is used to estimate the shared mean of two normals with unknown variances. I understand the literature has proven it is unbiased, but a proof of admissibility has not yet appeared in the literature, after many years since it was first proposed. Is there a general reason for this? I always th...
I have been trying to learn more about different types of Markov Chains. So far, here is my basic understanding of them: Discrete Time Markov Chain: Characterized by a constant transition probability matrix "P" Continuous Time Markov Chain: Characterized by a time dependent transition probability matrix "P(t)" and a co...
This is a sample from my original data set. I need to test whether y is significantly dependent on x (y~x), and I am thinking about how to model that properly. The problem is that this is annual data; each combination of destination and model can not be duplicated in a year, so [Milan; XG] can not be given twice in 201...
The empirical cumulative distribution function is defined as $$ F(x)=\frac{1}{n} \sum_{i=1}^{n} \mathbb I_{x_i \leq x} $$ Is there an equivalent interpretation of this function as: $$ F(x)=\frac{1}{n} \sum_{i=1}^{n} \mathbb I_{x_i<x} $$ The reason I ask is that I have a distribution of non-negative values, around 40% o...
This seems like a trivial question but I am currently stuck and cannot see what I am doing wrong. So let us consider a function $f(x) : \mathbb{R}^d \rightarrow \mathbb{R}^d$. I want to compute the derivative w.r.t. $x \in \mathbb{R}^d$ of an expression that contains a quadratic form of $f(x)$ $$I = f(x)^{\top} C f(x) ...
The problem: I am hoping to visualise interaction effects between a continuous and a dichotomous variable from a cox proportional hazard regression. When graphing this with different packages (visreg and rms:ggplot(Predict()), I got bafflingly different looking graphs. What did I miss in these two approaches that gener...
I'm building GAMs and I have some doubts regarding the family to use. I'm fitting GAMs because I expect some non-linear relationships between the response variable and some covariates. I've checked a lot of different sources but some details are still not clear to me. Specifically, I have a positive, non-zero response ...
I am trying to see if some anthropic variables (e.g., PopdensityAvg) explain animals' distribution. My dependent variable is the area occupied (non_null_cells) over the total area of interest (PAR), which can be expressed both as a percentage (range_perc, continuous variable, range: 0-100; e.g., 87.9) and as a proporti...
I am reading Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) chapter 10 Multiple Spell Analysis section 10.1.1 Estimation. On p. 215 the closed form of the total likelihood is provided: $$ L = \Pi_{i=1}^n \Pi_{k=1}^{k_i} \Pi_{r=1}^m \left[ \lambda_{y_k}^{(k)}(t_{ik}\vert H_{k-1}, x_{ik}) \right]^{\delta_{ik...
When we draw a contour for loss based on 2 or 3 parameters, we know that the loss is equal between two inner shape, but the parameters will be varied. So, which parameters in this inner shape give us a better generalization?
I am making a machine learning model with supervised classification. I want to input my data, cross validate my model and then test it on a test set. Finally, I will use this to transform/make predictions for another dataset. When it comes to creating the model I've been using cross validation on the training set (I ha...
I am trying to make two-sample Q-Q plots in Python. A Python function that is used for calculating quantiles has the option of fitting parameters for the calculation of quantiles. These parameters are mentioned to be location and scale. The description of the fitting procedure: "If fit is True then the parameters for d...
Let $X_n \rightarrow_d X$ and $Y_n \rightarrow_d Y$ where $X$ and $Y$ are i.i.d standard exponential random variables. However, I do not have that for any $n$, $X_n$ and $Y_n$ are independent. Can I still have the result that for any continuous sets $A$ and $B$: $$lim_{n \rightarrow \infty} P(X_n \in A \cap Y_n \in B) ...
My question is straightforward: Is there any alternative way to Box-Cox transformations to stabilize the variance of a time series?
I am trying to create a regression model for prediction. I need to generate prediction/confidence intervals for my model. I am trying to decide whether to use a quantile regression or linear regression model. If I use a linear regression model I need to ensure my prediction residuals are normally distributed to compute...
I have a dataset with transactions made on around 10,000 items in the past year. Part of the items in the dataset were bought only once (1 transaction), and others were resold (>1 transaction). I want to determine what influences that an item is resold more (e.g., initial price, popularity, visual properties) but don't...
Say I am trying to investigate the association between antidepressants and achieving recovery in a depression programme. I have an observational cohort of depressed patients enrolled in the programme between the ages of 20-90, and I wish to match patients by a series of depression measures (QoL surveys etc), the presen...
I have been using the methods outlined in: Bender, Ralf, Thomas Augustin, and Maria Blettner, "Generating survival times to simulate Cox proportional hazards models," Statist. Med. 24: 1713–1723 (2005) to generate survival times from a dataset. After building the Cox model, I specify a 'baseline patient' and use survfi...
Can the Mann-Whitney test be used to analyze two different Likert scale questions answered by the same users before and after an experiment? For example, question 1 is asked before doing an experiment and goes as follows, do you like reading (scale from 1 to 5)? Question 2 is asked after doing an experiment with the us...
I'm using the package statsmodels in Python 3.9.10. When I carry out a linear regression model, I get this: Am I right when I say: The F-statistic checks how likely the sample if all coefficients are 0. In this particular case, it's the same as the p value associated to the categorical variable VHD. This is because wh...
Background Following the guidance in Andy Field's Discovering Statistics Using R textbook I understand that before using Linear Mixed Model (LMM) analysis it is first necessary to assess the need for a multi-level model (p. 878). To do this you compare a (1) baseline model that includes only the intercept to (2) a mode...
I am trying to understand the connect between probability and measure theory. I get some basic things about measure theory. But what I still don't get is how do we choose the sigma algebra for our experiment. Suppose that we have two coins, then $\Omega=\{TT,TH,HT,HH\}$. Let $X$ be a random variable (measurable functio...
I am trying to fit a GLM to count data, with a single feature (also a count), and intercept term. Both the feature and response are nonnegative (but may be 0). I need to use identity link because I want to test the hypothesis that the coefficient in the linear model is 1. I can fit a Poisson regression to the data no p...
Hi I'm learning about mixed model (2x2 cross over trial) and I don't understand how this works; How do we get to the last part of Covariance where Cov(Ek(i), Ek(i)) = Var(Ek(i)) = between subject variability. Please can you explain step by step how we get this. Thanks so much!
Suppose that we have N-observations for a random variable $V$ from a population: $$\{v_1,\;\ldots,\;v_N\}$$ , and all of the observations is positive: $v_i>0\quad \forall i=1,\;\ldots,\;N$. Here, assume that the observations are "randomly sampled" (i.i.d.) I think, from the positive values of observations, it is reason...
let's say, I want to track a rowing team's (collective) performance on some task and show that it increases with practice. I have a metric, i.e. the time to measure their performance. Now I would like to show if/that the team's practice increases (and that possibility that the increase is caused by chance is smaller th...
Let's say I have an experiment in which I count the number of times mice successfully press a lever (scores). scores <- c(5, 8, 8, 8, 10, 10, 13, 13, 14, 22, 4, 9, 4, 4, 5, 9, 7, 14, 4, 14, 5, 1, 7, 10, 10, 15, 23, 23, 30, 23, 12, 16, 15, 16, 37, 18, 21, 20, 21, 25, 23,...
I have the following derivation for a latent variable model. $$ \newcommand{\d}[1]{\mathrm{d}#1} $$ $$ \begin{align*} \mathbb{E}_{q(x_0)}\left[-\log p_\theta(x_0)\right]\\ &=^{1.} \mathbb{E}_{q(x_0)}\left[-\log \int p_\theta(x_{0:T}) \d{x}_{1:T}\right]\\ &= \mathbb{E}_{q(x_0)}\left[-\log \int \frac{q(x_{1:T})}{q(x_{1:T...
My team is conducting a healthcare regression analysis and is interested in both the p-value and the magnitude of an interaction coefficient (i.e., effect size). For our project we want p-value < .01 and an effect size of at least 5% to determine if the interaction is practically significant. Using the mtcars dataset f...
Assuming the true equation for Y is linear as below: $$Y_i =\beta_1X_i +\beta_0 + \epsilon_i$$ Assuming X is fixed, then the variance of each Y is: $$var(Y_i )=var(\epsilon_i)=\sigma^2$$ In order to estimate $\sigma ^2$, we usually use the mse: $$\hat{\sigma}^2=\frac{1}{n-p-1}\sum_i(Y_i -\hat{Y_i})^2 $$ My question is,...
I am in the proccess of writing my Master's Thesis and I'm performing a multivariate regression (OLS). One of my independent variables is Chinn-Ito Index (financial openness index) which takes values from -2.5 to +2.5. The coefficient is .261. And the dependent variable is in log. Normally, we would interpret this coef...
I have a question in computing the asymptotic variance of a sequence of random variables that is identically distributed but are not independent. Suppose we have a sequence of i.i.d. random variables $X_i$ such that its second moment is finite. Then, by the classical CLT, we know that $\sqrt{n} (\bar{X}_i - E[X_i])$ is...
Can we use the non-parametric bootstrapping to compute the confidence intervals for the regression coefficients estimated from non-negative least squares? I wonder whether this has the same issues noted for lasso because depending on the bootstrapping sample you get different coefficients can hit the zero boundary.
This is not a question, but it is too good to pass. I read it is originally due to Enis, Peter. "On the relation $E (X) = E [E (X∣ Y)]$." Biometrika 60, no. 2 (1973): 432-433. Assume $Y$ has a Chi-square distribution, with one degree of freedom, so its density is $$f_Y(y) = \frac{1}{\sqrt{2\pi}}y^{-1/2}\exp\left\{-\fra...
Consider the standard ROC-AUC metric, which has been shown to be equivalent to the normalized Wilcoxon-Mann-Whitney: $$ AUC = \frac{1}{N^{(+)}N^{(-)}} \sum_{i}\sum_{j}1[\hat{p}_i^{(+)} > \hat{p}_j^{(-)}] $$ where $\hat{p}^{(+)}, \hat{p}^{(-)}$ are the estimated probabilities for positive ($y=1$) and negative outcomes (...
I was looking at this paper on Conditional Models and Marginal Models :https://people.stat.sc.edu/hansont/stat770/LeeNelder2004.pdf . Based on my understanding of this, it seems like Marginal Models are intended to model the overall effects averaged over all individuals whereas Conditional Models (I think these are syn...
Consider the Gamma distribution: $\Gamma(\alpha,\beta) = \frac{\beta^\alpha x^{\alpha-1} e^{-\beta x}}{\Gamma(\alpha)}$ According to many sources (e.g. wikipedia), the mean is given by $\mu=\alpha/\beta$. On the other hand, using Maximum Likelihood Estimation, we can find that (see page 11 here for example) $\hat{\beta...
Here is another problem in which independence might be an issue (however, the question might be very basic). Suppose, I have a rowing team and I have two boats (B1 and B2, for brevity). I have strong reason to believe that the team performs better with B1 than B2, so I want to compute a significance test. This is would...
I have a dataset that looks like this: cc samples population % sample US 100 1,000 1% CA 20 100 20% BR 9 10 90% AU 600 300 200% I have samples from a certain population and the percentage of samples taken over a period of 6 months. I categorize samples based on two characteristics (A and B). After, I ...
I am trying to compute the gradient with respect to a vector $\mathrm x \in \mathbb{R}^d$ of a complicated expression involving the trace of matrix product. The expression is the following: $$ F(\mathrm x) = \text{Tr}\left[ C \nabla (C^{-1} \mathrm f(\mathrm x)) \right],$$ where $C$ is a $d \times d$ matrix, and $\ma...
For linear regression $$y_i=x_i^T \beta+\epsilon_i$$ what is been sampled? Sometimes I see that our sample is $\{X_1,X_2,\ldots,X_n\}$ while other times I see that our sample is $\{Y_1,Y_2,\ldots,Y_n\}$ where each $Y_i$ and $X_i$ are random variables. Few times I saw $X_1,\ldots,X_n \, \stackrel{i.i.d.}{\sim} f$ and s...
If you have a random variable $X$ such that $\mathbb{E}(|X|^k) < \infty$, does it follow that $\mathbb{E}(|X|^{k+\epsilon}) < \infty$ for some (potentially small) $\epsilon > 0$? If not, what is a good counterexample? I.e. a random variable such that $\mathbb{E}(|X|^k) < \infty$ but $\mathbb{E}(|X|^{k+\epsilon}) = \in...
I've read ALOT of papers and questions here as well, on other websites, but I didn't get the point behind the LASSO. my background is in economics (not an expert in math). sorry for my bad english... so, broadly speaking our desired total cost function by which we want to balance between how well function fits data. ...
The concept of degrees of freedom appears in many places in statistics. Yet I still don't understand what is the role of degrees of freedom. Why can we just use sample size (and we need to decrease it with something)? In general, is it better when my model have more degrees of freedom?
Equation: MI(X,Ci) = ∑P(X,Ci) . log ( P(X,Ci) / P(X)⋅P(Ci) ) where, X is url, t is a url token and Ci is the i-th class will be either spam or ham P(t,C) will be either the frequency that the word "fakedDoamin" appears in all of the spam urls divided by the number of words in the spam urls, or the same for the ham (non...
I am reading Cox's Case-Control Studies(2014) pg 6 of Preamble chapter. The book uses DAGs but it seems that it deviates from DAGs. I am not sure whether the following statement should hold in DAGs causal inference context. Consider $X$ treatment and $Y$ outcome with arrow $X\to Y$ with observed confounding $W_O$ assoc...
I have data measured at fixed intervals in one process. It needs to be weighed with cost value that is generated in another process that is analogue and the costs it generates have jumps. Imagine a wind turbine that is recording wind speed every 250ms with power storage and consumption. Every time storage connects/disc...
Let $f:\mathbb{R}_+^2\rightarrow \mathbb{R}$ be a symmetric function (i.e., $f(t_1, t_2) = f(t_2, t_1)$ for all $t_1, t_2 \in\mathbb{R}_+^2$). Are you aware of any extra condition that $f$ should satisfy for it to be a covariance function, that is, for the matrix $(f(t_i, t_j))_{i, j = 1}^N$ to be positive definite for...
I have the following 2x2 contingency table of observed frequencies: Contingency Table ------------------------------------------ Categories -------------- Cat 1 Cat 2 Total ------------------------------------------ Group 1 135 16...
Say we have an arbitrary real matrix $M$. I am wondering if we can find a cross-correlation matrix that has the least square distance to $M$. In other words, $$\min_{A,B} \|M-A^TB \|^2_F $$ s.t. $$diag(A^TA)=\mathbf{1} $$ $$diag(B^TB)=\mathbf{1} $$ All these matrices are real. How can I perform this optimization? Is th...
I have a daily time series starting (01/11/2022) and ending (30/06/2022). I'm trying to make a model of my time series. First, I made: tsdata<- ts(gain_day_cut$`Gain per day`, start = 1, end = 171, frequency = 7) tsdata_decompose <- decompose(tsdata) residuals <- checkresiduals(remainder(tsdata_decompose)) tsdata_recom...
I have been working with GANs for years and I still can't figure this out. A common thing I see is when the loss of both G and D are near zero. I usually use MSE or cross entropy loss. Shouldn't this be impossible regardless of whether your GAN setup is good/bad/stable/unstable? The loss for G is defined by how well it...
Let $$X \sim Unif(0,1000) \\ Y \sim N(1000, 1)$$ $X$ has no effect on $Y$, but for some reason, we decide to predict $y_i = f(x_i) + \epsilon_i$ using a penalised B-spline (note the lack of intercept term). After seeing how the basis function looks like: # Create a smooth term matrix from the basis function n_points <-...
In Schervish's Theory of Statistics (1995) and again in A Measure Theoretic Formulation of Bayes' Theorem by @ArtemMavrin, the following equation was proved in detail $$ \mu_{\Theta \mid X}(A \mid x) = \frac{\int_A f_{X \mid \Theta}(x \mid \theta) \, d\mu_\Theta(\theta)}{\int_\Omega f_{X \mid \Theta}(x \mid \theta) ...
If A (density of a material) and B (solid volume of a material=mass/density) are highly correlated features, how to decide which one of these two features shall I drop? After normalization, feature A consists of two values, either 0 or 1 (I have only used 2 materials in my model), but feature B consists of more than 5 ...
I'm currently using an EEGNet model to train on baseline corrected EEG data (containing 64 channels sampled at 512 Hz) to classify three mental states hence it's a 3 class classification problem. The EEG data is as 6 files, (A, B, C, D, E and F, where each File contains the potentials of recorded EEG signals (which are...
I am a beginning PhD student in biostatistics and want to learn about high-dimensional statistics. I have looked into the books by Buehlmann/Geer, Wainwright, and Giraud, but they seem to be targeted at researchers: for example, the derivations are sometimes hard to follow and there is little help on practical issues. ...
I am trying to fit a model which has age as a control variable and mental health score as my dependent variable. I centered the age because 0 is not meaningful in my analysis. I tried age, age^2, log(age) and age^1/2, all of them are not significant with p-value>0.1. Is there anything that I did wrong?
Suppose $X$ is a multivariate normal distribution in $\mathbb{R}^3$ with a covariance matrix whose rank is 2. Therefore, it is a singular distribution. Is it possible to represent it as a push forward of some non-singular multivariate normal distribution in $\mathbb{R}^2$? If the answer is yes, how to define the measur...
For context, I am reading this document: https://webspace.maths.qmul.ac.uk/t.prellberg/papers/pub084pre.pdf. I am on the section of pruned and enrichment sampling of a random walk. The document neatly lays out a genealogy of random walk methods. They first explain simple random walks, biased random walks (one direction...
The lasso estimator is $$ \hat\beta = \underset{\beta}{\text{argmin}}||Y-X\beta||_2^2+r||\beta||_1 $$ I always read that the coordinates $\hat\beta_j$ of the lasso estimator tend to be either clearly separated from zero or zero exactly. But when I check the outputs of glmnet or other algorithms, I regularly find values...
I have ran a glmm in r using glmmTMB from the glmmTMB package because my y variable (CVbetween) is from a beta distribution so I need to use family = beta_family. When I look at the results with summary(model) It shows the results for the intercepts of certain fixed effects but it only show some results which is leavin...
I'm trying to run a power calculation by simulation on a set of exponential decay datasets using the nlme package in R. Here's the process: Simulate a bunch of exponentials, using some conservative parameters with a small effect size and some noise Run a nonlinear mixed effects model 1000 times each at different sampl...
I'm trying to compare the performance of two models in explaining an outcome y. E.g. mod1 <- lmer(y ~ A*time + (1|subj)) mod2 <-lmer(y~ B*time + (1|subj)) What would be the best way to compare and determine whether mod1 explains y better than mod2? Thank you for your help!
I want to use logistic regression, but my data are time series data. Every observation is a different day, and I have days consecutively for 20 years. I have three variables(the predictors) that are daily measurements in these 20 years. My dependent variable is if it snows or not that day. I cannot use Logistic regres...
According to Bishop, the author from "Statistical Pattern Recognition", we can optimize the hyperparameters of a Gaussian process by maximizing the likelihood function $$p(\textbf{t}|\theta),$$ where $\textbf{t}$ denotes the target vectors $(t_1, .. ,t_N)$ of the corresponding input values $x_1, ..., x_N$ and $\theta$ ...
I have an effect size that is a difference between two regression coefficients $\Delta\beta=\beta_a-\beta_b$. The response and predictor units are the same in each model, and the question relates directly to the difference in slopes of the two regression models. I am however a bit lost how to calculate a confidence int...
I'm unsure why, given a uniformly most powerful test exists, that the Neyman-Pearson lemma delivers the same critical region for all $\theta_1\in \Omega_1.$ Is it because this is the smallest critical region?
I have a dataframe which is a made of many datasets combined together (many datasets with the same predictive features but with different samples combined together). This dataframe, called scoresWithResponse , contains the target feature (binary feature, Response / NoResponse) along with many predictive features. The f...
Questions about that section of the book (see image below) were already asked and they cover how to get from 2.9 to 2.11, see here and from 2.12 to 2.13, see here but do not cover how to get from 2.11 to 2.12! 2.11 can be written as \begin{align*} & E_{X}E_{Y|X}([Y - f(X)]^2| X = x) \\ &= \int_x \left( E_{Y|X}([Y - f(X...
I am wondering how the confidence of each individual test in a block of multiple comparissons is affected. example: if i make 100 tests with 95% confidence, the probability of an error in the whole block is bigger. I am wondering how this affects the confidence of this 100 tests chosen at random. Meaning, if I take one...
I am new to mediation analysis and would like to know how to interpret the results of a mediation analysis obtained using R. The independent variable is gender (1 Men /2 Women, categories). The dependent variable is COPD (0 No COPD / 1 COPD, categories). The mediator is tobacco habit (0 no tobacco habit / 1 yes tobacco...
Except logistic regression, are there any other classifiers that produce well calibrated probabilities out of the box?
What transformation can be used to establish relationship between two variables whose scatter plots looks like the plot below? I have applied log Y, log X, exp Y, exp . But a relationship could not be established with high R-squared.
The Gaussian Poincare inequality states that: for $f: \mathbb{R}^n \to \mathbb{R}$ and $Z\sim \mathcal{N}(0,I)$, we have that \begin{align} Var(f(Z)) \le E[ \| \nabla f(Z)\|^2]. \end{align} My question: For what class of functions do we have equality?
In a basket, there are a certain number of oranges and 3 apples. The probability of pulling two oranges out without replacement is $\frac{6}{11}$. What is the total number of pieces of fruit in the basket before any are removed? A person either pulls two oranges out or they do not. Why is picking two oranges a random...
I often see that the "Spherical Error" assumption is invoked for Gauss Markov. One of the parts of the assumption is that the variance is constant given $X$. The other is usually that the errors are uncorrelated with each other, given $X$. For example, on a regression of $Y \sim X$ on $i \in \{1,\ldots,n\}$: $$ E(\epsi...
I found a textbook online that had the following to say regarding the Lasso, "Computing the p-values or confidence intervals for the coefficients of a model fitted with lasso, remains an open problem." Why is it that currently inference on the coefficients is not possible? Is it that structurally the variance of the ...
The core of my question is: What is the meaning of a negative SMD? To assess the balance after Propensity Score Matching (PSM) with the R package MatchIt the documentation explains the Std. Mean Diff (Standardized mean difference). The values in that example are positive and negativ. My problem is that there are also n...
I'm using the peaks over threshold method to answer a researchquestion. I'm working with time-series data and the observations are not entirely independent. I know that there is some methods you could apply to make the observations approximately independent as "declustering-method", however my data is quite small which...
I want to do multi-class classification, XW=Y, where $X\in R^{n\times p}$, $W\in R^{p\times c}$, $Y\in R^{n\times c}$, in which Y is of one-hot, and n, p, c stands for numbers of samples, features, classes, respectively. Before classification, I want to do feature selection to delete some redundant features. Suppose I ...
I have samples from left hand and right hand of same individuals (11 patients, 22 measurements) and left (4) and right (2) hand from different individuals (6 patients, 6 measurements). Is it possible to combine all together and check for statistical differences between left and right hand?
I am trying to work out this formula here. However I am unsure what does the Beta stands for. Hope I get some help here. Thank you. This is part of the IMF Global Financial Stability Report October 2017. In page 133. Thanks alot!!
I've used pspline to add restricted cubic splines to certain continuous covariates that violated the PH assumption upon first analysis. I identified these covarites using cox.zph and also used Schoenfeld plots to plot the offending covariates (p<0.05). After using pspline and re-running cox.zph I see that my offending ...
I am trying to evaluate the normality of the distribution of my model's residuals. I have been using statsmodels.api.qqplot and sklearn.stats.probplot in Python, but they both produce different axes giving different impressions when visually inspecting the "closeness" of the distribution to normal distribution. The skl...
Suppose we are dealing with a prediction problem, the target variable is $Y$, the predictive covariates are chosen from $\mathbf{X}=\{X_1,X_2,...,X_n\}$. The causal graph (DAG) on $Y,\mathbf{X}$ is known. We hope to predict $Y$ with a selected subset of $\mathbf{X}$, for example, predicting $Y$ with the conditional pro...
I am new to the idea of causal inference or causality in statistic and in Python. I have a dataframe test which looks as follows: x y 0 0.03 315.98 1 -0.03 316.91 2 0.06 317.64 3 0.03 318.45 4 0.05 318.99 ... ... ... 58 0.92 406.76 59 0.84 408.72 60 0.97 411.66 61 1.01 414.24 6...
I have a model that looks like this $$ x(k) = \sum_{m}^{M} e^{i (U_m k + \beta_m)} + n(k)$$ Where $U_m$ has a Gaussian distribution with parameters $\mu$ and $\sigma^2$. $$ U_m \sim \mathcal{N}(\mu, \sigma^2) $$ and $\beta_m$ has a uniform distribution $$ \beta_m \sim \mathcal{U}(0, 2\pi) $$ The $n$ is an additive zer...
I have a dataset whose variables are NUM type. I created two subsets train and test and a bayesian network using HC algorithm from test dataset. I want to predict a variable of the network based on the given train data set. I used the following code: library(bnlearn) train = data.frame(df[1:120, ]) test = data.frame(d...
What algorithm should I go for if I want to determine collective outliers within a dataset? By collective outliers, I mean a series of data points differ significantly from the trends in the rest of the dataset. The data refers to time-series. I cannot find an algorithm that does this. The ones that I find are all focu...
Which is the most appropriate DID estimator when we are studying the impact of certain policies on firms across different countries where some firms adopted the policy in every country at diiferent times. I was reading paper by (callaway and santanna 2020) but problem with this paper is that it cant handle time varyin...
these are my results as part of my Master Thesis. I am curious whether the high degree of freedom for the residuals of 98 makes sense at all. My data set has n=100 observation and I have 1 independent variable. Thank you! fi
I would be grateful if someone could explain the difference between Item Factor Analysis, Item Response Theory and Exploratory IRT. Any references especially for the exploratory IRT are welcome. Nikos