instruction
stringlengths
9
38.7k
I have fitted Lasso and Ridge regressions on the same training data and having checked the training MSE error seems more-less the same: from sklearn.linear_model import Ridge, Lasso from sklearn.metrics import mean_squared_error lasso = Lasso() lasso.fit(X_train, y_train) print(lasso.coef_, lasso.intercept_) print(me...
I would like to compare two samples with the watson's two sample test in R (circular data). As I have a lot of ties in my samples, I followed the example given in the book from Zar (Biostatistical analysis) for the watson's two sample test with ties (I did it by hand). I was curious to see if it would give me the same ...
When calculating the median for an even number of samples, we sort the samples and take the arithmetic mean of the two in the middle. This seems quite arbitrary - it assumes the best way to interpolate between the two samples is a linear interpolation. Why not use the geometric or some other mean? Wikipedia lists quite...
I have a neural network that gives out a probability distribution of 128 in length. However, the output mainly comprises numbers close to 0. (Probability of Strike) What can be the reason(s) for such a situation to arise? Some information about the Network:- It uses LeakyRelu as the activation function. It is a conv...
I have figures below taken from Diganta Misra's paper "Mish: A Self Regularized Non-Monotonic Activation Function." They visualized both the loss output landscapes in Fig 4 below: And they also showed different activation functions landscapes: Questions: What is a landscape please for either a loss function or activa...
One of the three conditions that should be checked before conducting two-sampled z-test for proportions is "check for normality"(link for the source: https://vitalflux.com/two-sample-z-test-for-proportions-formula-examples/). But how can we check whether binary data is normal?
In Urn No. 1 (first urn) there are $y$ balls, of which $x$ white balls and $y-x$ black balls. In Urn No. 2 (second first) there are $y$ balls again, but the white balls are $y-x$. You randomly take a ball from the first urn and place it in the second urn. Then, from the second urn you randomly take a ball and place it ...
Suppose there is a system in which individuals are measured only at discrete time points (e.g. blood pressure is measured once every year) and these individuals have the ability to transition between multiple states (e.g. disease free, disease stage 1, disease stage 2, death by disease of interest , death by comorbidit...
wilcox.test(data$personal_sex, data$dwelling_problems_safety, mu=0, alt="two.sided", conf.int=T, conf.level =0.95, paired=F, exact=F, na.action = na.omit) My Hypothesis is : H0 : Male = Female H1 : Male not equal to female So my question is when, I reject the null hypothesis and accept that the difference in male and...
Answer order bias is something I occasionally hear about, especially in the context of election ballots. But presumably, it can also occur in various other situations like online polls, multiple-choice exam questions, etc. Let's say I design a questionnaire system that randomizes the order of answers for users. For any...
Given some combination of mean/mode/median, how would I go about generating a distribution that can fit an arbitrary combination? For cases where mean = mode = median, I would just use a normal distribution. How could I generate a distribution with, say, mean=3.0, mode=4.0, and median=5.0? I've searched around and coul...
Pretty straight forward question. Even if we are looking at the shape of the sample's distribution, are we sampling from the Control group or the Treatment group, or both?
I need to estimate a parameter of a distribution but I don't have an explicit estimator. I decided to do a partition of the interval range for the parameter and use the newton-raphson method to find roots of the ML function. In simulated data, I am getting 2 distinct roots. How to find the "right" one? In fact, looking...
I know that it is generally accepted that the two-sided test is the "Gold Standard". However, I just wanted to see if there are real life, practical applications of the one-sided test in the real world, or if this only exists in academia. Edit: "Generally accepted / Gold Standard" in the sense of being the default reco...
As we know that we can perform a Bias Variance decomposition of an Estimator with MSE as loss function and it will look like below: $$\operatorname{MSE}(\hat{\theta}) = \operatorname{tr}(\operatorname{Var}[\hat{\theta}]) + (\|{\operatorname{Bias}[\hat{\theta}]}\|)^2$$ Similarly, if we want to perform a Bias Variance de...
Hello I have the assumptions that $E(X) = 0$ and $\operatorname{Var}(X) = {\sigma}^{2}$ . Why does this inequality hold $P(X \geq \lambda) \leq \frac{{\sigma}^{2}}{{\sigma}^{2} + {\lambda}^{2}}$ for $ \lambda \geq 0$. It seems like a stronger statement than the Markov inequality and I assume therefore that it must have...
I have a simple question about moment generating functions(MGFs). Does the interval on which a MGF is defined corresponds to the support of the random variable? For instance, considering a standard logistic density function $f(x)= \frac{e^{x}}{(1+e^x)^2}$ where $x \in(-\infty,+\infty)$. Does the interval on which the M...
I would like to create an algorithm that chooses an overall contest winner from an arbitrary number of participants where for each participant I have performance metrics across an arbitrary number of contests. The performance metric ranges from 0 to 1 for each category, the higher the better. The below table shows an e...
Edited for clarification: I'm referring to the beginning of the hypothesis testing process where we are deciding "Which Test should I use, the T test, Z test, F test, or Chi Squared Test?" The following cheat sheet does a great job in explaining which test you should use, except for the "Distribution" column: What is ...
It's known that maximizing the log-likelihood is equivalent to minimizing the Kullback-Leibler divergence between the model $q(x \mid \theta)$ and the unknown true data generating distribution $p(x)$: $$ \begin{split} \hat{\theta}_{\mathrm{ML}} &= \arg\min_{\theta} \mathrm{KL}(p(x) \mid\mid q(x \mid \theta)) = \arg\mi...
I have the data (samples) that represent population sizes of different bacterial cultures from 4 distributions for which I would like to compare the ratio of the means between them. Specifically: $Ratio_{1} = \frac{\overline{X_{1}}}{\overline{Y_{1}}} $ $Ratio_{2} = \frac{\overline{X_{2}}}{\overline{Y_{2}}} $ What I'm...
I'm working on the multi-class prediction problem, with 6 output classes. These represent different types of land cover. The classification model is pixel-based and I have extracted different attributes from satellite imagery. I have created training dataset from the field data then trained my random forest model (usin...
The source below seems to suggest that ANOVA post-hoc tests are simple t-tests (or "pretty much so") and therefore that planned contrasts are more powerful. This was also my understanding until today. Although the [contrast analysis] procedure is much more powerful, its aim is analogous to the post hoc analysis (prett...
Let say I have a sample of size $n$ as $\{X_1,X_2,...,X_n\}$. The sample points $X_i$ are integers, but each of them are actually integer ceiling of corresponding real number $\{Y_i\}$. For example if $Y_1 = 50.45$ then corresponding $X_1 = 51$. Also $Y_i \sim \mathrm{exponential}\left(\lambda \right)$. From the observ...
I created logistic regression model, however my data is very imbalanced (92% vs 7%) so I created both balanced and imbalanced version using sklearn. For my version on the left, I used: clf = LogisticRegression() for my weight-balanced version (on the right) I did: clf = LogisticRegression(class_weight='balanced') Whe...
Suppose I have a hypothesis test for $H_0: est_{LCL} \le 0.4$ vs $H_1: est_{LCL} > 0.4$ where $est_{LCL}$ denotes the lower confidence limit for a two-sided $100(1-a)\%$ confidence interval for $est$ . For a two-sided $100(1-a)\%$ confidence interval, the $est_{LCL}$ can be calculated as $ est_{LCL} = est- z_{1-a/2}\s...
Most statistical computing packages have functions to sample out of a two-parameter Beta distribution, but not many offer functions for sampling out of a four-parameter Beta distribution. If I want to generate samples $y$ from a four-parameter Beta distribution with lower bound $a$ and upper bound $c$ so that $$y \sim ...
I have a data set that I would describe as unbalanced or partially nested and I am unclear about how to proceed. My data is nested as follows. The number of samples I have is listed in parentheses. Site 1 - North: Zones A (4), B (4), C (3) Site 1 - South: Zones A (4), B(4), C(0) Site 2 - (8) Site 3 - (8) Sites 2 and 3 ...
In Probability and Statistics, a Markov Chain is said to have the "Markov Property" if the next state of this Markov Chain only depends on the current state of this Markov Chain. This being said, I had the following question: Suppose I have some data about a Discrete Markov Process, such as the weather each day (e.g. S...
I have searched throughout the Internet trying to find a demonstration of the RANK condition to Simultaneous Equation Model (SEM) but I couldn't find it. For Equation Systems with well defined system of equations (endogenous in left side and exogenous in right side) I already have seen the proof of Rank Conditions. But...
Suppose there are $N$ balls in an urn, with $X$ white balls and $N-X$ black balls. We perform $k$ iterations of the following process: Choose a random ball form the urn. If the ball is white, we put it back with an additional white ball and discard a black ball. If the ball is black, we simply put it back. When there...
Is there any difference between y ~ pmin(x, 60) + sex , df = data and y ~ x + sex, df = subset(data, x <=60) If they are the same, then why use pmin(x, 60)
My X & Y variables are associated like this below and I am trying to fit a simple linear regression model (y ~ x , data= df) , to estimate β1 . However I am not confident about extending the linear slope to values beyond 30. I want to restrict the regression slope to only x < 30 For x > 30 I want to slope to be horizo...
I have a burning question. First, in Python: import os import time import numpy as np from sklearn.linear_model import LassoCV from sklearn.datasets import make_regression X, y = make_regression(1000, 5000, noise = 4, random_state = 123) if not os.path.exists("tmp"): os.mkdir("tmp") # Save on disk to be read in R s...
I have an model that I want to test with my existing data to calculate precision, recall etc. The data is actually unbalanced dataset: Class A 70%/Class B 30%. I created a data set by undersampling class A, so that I get an equal distribution of both classes: Class A 50%/Class B 50%. When calculating the metrics for ev...
I am working on an imbalance dataset with a 98:2 ratio (1M record in the majority class and 20K in the minority class) I am planning to run my model for 30 folds, I tried with stratified K folds but here again, each fold will have an imbalance problem again I don't want to use SMOTE analysis as it creates data loss o...
I have a dataframe contains id, gender, and class, for example: import pandas as pd df1 = pd.DataFrame({'id': ['1','2','3','4','5','6','7','8',9,10], 'gender': ['Male','Female','Male','Female','Male','Male','Male','Female','Male','Male'], 'class': [1,1,3,1,2,3,2,1,3,3]} ...
Consider a polynomial $p(z)= \sum_0^n a_i z^i.$ In the literature there are numerous bounds about the roots of $p(z)$.Now once we prescribe certain dsitribution to the coefficients ,the bound itself becomes a random variable.Generally ,it might not be always possible to find the distribution of the bound .Suppose in c...
I want to derive the CRLB of the hyper-parameters contained in a covariance kernel of a Gaussian process. My kernel looks like the following. $$ K(t, t^{\prime}) = \exp(-\sigma^2/2 (t - t^{\prime})^2) \exp(i \mu (t - t^{\prime})) $$ where $i = \sqrt{-1}$. The parameters are: $$ \Theta = [\mu, \sigma] $$ The vectors $\m...
I have the following problem: We have a model of 3 latent variables with 8 observed variables each. Our sample size is 19, which can't be upped because it is a special subgroup of the population and this is a pretest to see if the factor structure is roughly as expected, so we can use the scale in an even smaller sampl...
Even though I already have some experience working with R I would still consider myself a beginner. For my current research project, I need to run a zero-inflated negative binomial regression with fixed effects. The mixed_model() function seems to be the only way to do this in R. However, I find the manual to the funct...
I am doing survival analysis with KM estimates and one of my curve displays a survival drop to zero: As I was explained here the drop is here because the last time is an observed event (death) and not a censor. In my case it is not a database error because I don't have a constant censoring time. In this case, how shou...
Let $X$ be a random variable with density function $f(x)$. We know how to compute $$P[X\in A|X=x]=I_A(x)$$ But how to calculate, for example, $P[X\in A|\sin(X)=y]$? I think it could be like this: $$P_{X\circ sin(X)}(A\times B)=P(X\in A\cap sin(X) \in B)=P(X\in A\cap arcsin(B))=$$ $$=\int_{ arcsin(B)}I_A(x)f(x)dx=I_1+I...
I need your help regarding the information inside the picture. As you know all the information will change with the change of NDVI axis from y-axis to X-axis, except R2 and p-value remain the same? Why RMSE and MAPE changes with the change of axis? Thank you all
This is a classic question, and I understand the answer from one approach, but I'm trying to understand the underlying conditional probabilities. We have two bags: Bag A contains 5 keys, Bag B contains 7 keys. One of the 12 key's fits a lock. If we select a bag and key at random what is the probability we find the cor...
If I scale data from an arbitrary distribution using the standard score, will the property of the normal distribution that 75% of data lies between +/- 2 standard deviations from the mean, still hold?
I am given the following Hidden Markov Model: $X_{k+1} = \alpha X_{k} + b W_{k+1}$ $Y_{k} = cX_{k} + dV_{k}$ Also, $V_{k}$ and $W_{k}$ are independent and iid following $N(0, 1)$ I am required to calculate the variance of importance sampling estimate of $p(y_{k})$ I have started by calculating the importance sampling e...
I am reading the paper Efficient Computation of the Fisher Information Matrix in the EM Algorithm (Meng & Spall) and am unsure what the difference (if any) there is between the notation $\partial^2/\partial{\boldsymbol\theta}^2$ and $\partial^2/\partial{\boldsymbol\theta}\partial{\boldsymbol\theta}^T$ as seen in the sc...
I am trying to create a plot with 2 linear regression lines for each group (i.e., CAD, and Healthy). One linear regression line before the break point and one after it, for each group. I would like to determine from which power value, the slope starts to be under 3.9 in each group. At the moment, I can only create a pl...
I am reading Generalized linear models with random effects : unified analysis via h-likelihood Chapter 4 on Extended Likelihood principle. I came across an example and I am not sure if I am understanding joint maximization correctly. Given extended likelihood where $\theta$ is a single fixed parameter, U is a single u...
Assume a survey asks a question in year one that 100 respondents answer. In year two, the survey asks the identical question and 120 respondents answer, but only 80 of them took part in both surveys (these numbers are arbitrary, purely for creating an illustrative example). I gather from Time series with same variabl...
I'm trying to figure out my assignment to simulate lrt test p-value output using the Monte Carlo method. As far as I understand, the lrt test is supposed to test for "better", more accurate model. I know how to perform such a test: nested <- glm(finalgrade~absences,data=grades) complex <- glm(finalgrade~absences+age,da...
I wonder if it is valid to perform a statistical test on t-values or z-scores. For instance, if one gets two groups of t-values, every t-value is generated from an individual t-test and the value itself is used to represent "effect size or standardized effect", then one wants to know whether the effect size in groupA i...
Study participants read one out of four possible story versions, then responded by rating something on an 11-point scale. I want to compare the difference between responses for those who read story Version 1 vs. those who read story Version 2, on the one hand, VERSUS the difference between responses for those who read ...
I am looking for an algorithm that can show whether the features in a time series data have any causal relationship. Can we use Granger causality to determine causal relationship in a multivariate time series data?
I am doing an EFA for transcriptomic data (n=202, p=190). I did log-transformed the data because of skewness. My question is, do I have to do false discovery rate (FDR) analysis at all prior to my EFA. Thank you
Example Say Investigator 1 is looking to investigate the effect of fish consumption (a binary variable $A$ indicating whether they eat or do not eat fish) on cardiovascular health (a continuous variable $Y$). They have a set of observed variables, $\boldsymbol{L}$, that cause both the exposure $A$ and outcome $Y$, i.e....
In an old article (1990s), results are reported where 30 subjects respond to two kinds of words and reaction time in milliseconds (ms) is measured for every response. In an repeated measures analysis of variance, the two conditions (types of words) are compared (averaged over the about 10 items per condition). The stat...
I'm aware that the 2-loglikelihood ratio is asymptotically distributed as a Chi-squared distribution under the Null hypotheses for nested hypotheses. My question is, there is any generalized formula for the asymptotical convergence of the -2LR for any hypotheses test? I found this paper: Likelihood Ratio Tests for Mode...
Is this the correct way to calculate time to an event(death) for survival analysis? t2death column calculated using SQL as: case when death_dt is not null then death_dt - admission_dt else study_end_dt - admission_dt end as t2death The final data looks like: id time0 study_end_dt admission_dt death_dt ...
This might be a very beginner level question. I have fitted a model with glmmTMB R package, considering the interactive effect of mean wind speed and average daily rain as well as an interactive effect of mean temperature and mean relative humidity on plant disease severity. Here is my fitted model mod1 <- glmmTMB(di...
Regarding "non-PhD" in the question title, please answer this question for the audience of people with a solid understanding of probability distributions but no knowledge of the nuances of different statistical paradigms (e.g., frequentism, Bayesianism, likelihoodism). After reading through the existing stack exchang...
I have executed an analysis using the novel approach developed by Imai et al. (2021) that allows for the execution of matching/weighting techniques when using panel data. I was planning on running sensitivity analysis using the sensemakr package in R to assess the degree to which unobserved confounding may nullify/flip...
m1<- glm.nb(number ~ Force+SelfEthnicity+offset(log(`Resident Population`)), data=df_merge2) > dput(head(df_merge, 20)) structure(list(Force = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), levels = c("BTP", "Cumbria", "South-Wales"), class = "factor"), SelfEthnicity = ...
Per title, it always confuses me than not, specially when more random variables are used. There is more than one way to get confused imho: (As in title) P(A|B,C) = P(A|(B,C)) or P((A|B), C)? P(A,B|C) = P((A,B)|C) or P(A,(B|C))? Is it understood from context? Or is there a more rigorous way to prioritize how to unpack...
I would like to use a Friedman Test as a non-parametric alternative to a 3-way ANOVA in RStudio. I would like to measure how 'cl_conc' (Response Variable) is affected by 'soil_type' (Fixed Effect #1 - 2 levels), 'treatment' (Fixed Effect #2 - 4 levels), with 'core' as a Random Effect and 'days' as the Repeated Measure....
Why am I getting different results from jags and stan in a simple linear regression model? Using Sepal.Length ~ Petal.Length in the iris dataset as an example. OLS: > lm(Sepal.Length~Petal.Length, iris) Call: lm(formula = Sepal.Length ~ Petal.Length, data = iris) Coefficients: (Intercept) Petal.Length 4.306...
Suppose I run a regression looking at the correlation of a training program on wages and I include dummies for different levels of for age, education and industry: $$ wage_i = \beta_0 + \beta_1 program_i + \sum_j \alpha_j age_j + \sum_k \gamma_k education\_level_k + \sum_l \eta_l industry_l + \epsilon_i $$ Suppose $j=1...
I'm dealing with a video classification ML problem where there are ~10k total scenes, each labeled with a category I need to predict. The problem is that each scene consists of ~100 separate videos (taken at different times from different angles), and only ~10% of the videos from any given scene actually contain releva...
In class today, we were doing a lab exercise in which we used R to fit a basic ARIMA time series model to predict the rain fall at a daily level. I noticed that during some months where there has not been a lot of rain (e.g. drought), the ARIMA model would make "illogical predictions". For example, the ARIMA model woul...
Sorry if this question is this community's equivalent of asking a chef how to boil water, but if you had a data set that consists of: [A±a, B±b, C±c, ..., N±n], where each value has a corresponding zero-order measurement uncertainty (as in, if you have a ruler with 1 mm ticks, the uncertainty would be 0.5 mm), you coul...
I am looking for the best way to represent data from a survey I conducted in a statistical form. Basically, I am looking to compare if the participant was familiar with the salamander species 'hellbender' (Familiar vs. Unfamiliar), the see how likely the participant was to believe the species would bite, be poisonous, ...
Let $(E,\mathcal E)$ be a measurable space, $(\Omega,\mathcal A,\operatorname P)$ be a probability space, $(X_n)_{n\in\mathbb N_0}$ be an $(E,\mathcal E)$-valued process on $(\Omega,\mathcal A,\operatorname P)$, $f:E\to\mathbb R$ be bounded and $\mathcal E$-measurable and $$Y_n:=f(X_n)\;\;\;\text{for }n\in\mathbb N_0.$...
I have mean, standard devation, median, min, and max of a dataset, but not the source data. Which summary plot would you recommend for visualising different groups in the dataset?
For a uniform distribution on the interval between $0$ and $1$, there is a $Beta(1,1)$ and Bernouli distribution $ Bernouli(1, 0.5)$ that can describe this. What parameter values for the Beta and Bernouli distribution that can describe the uniform distribution with interval $1$ and $n$?
I have a dataset $X$ which I want to perform PCA on- however, I don't care so much about explaining the variance of certain features. So instead of using the "normal" definition of reconstruction loss: $$L(w)=\frac{1}{n}\sum_{i=1}^{n}||x-(x\cdot{}w)w||^{2}$$ I want to use a modified norm: $$L_{A}(w)=\frac{1}{n}\sum_{i=...
We have a minimal exponential family $f(x) = h(x) \exp(\langle\theta, t(x)\rangle - A(\theta)).$ The canonical parameter space is $\Theta = \{ \theta \in \mathbb{R}^d \colon \int h(x) \exp(\langle\theta, t(x)\rangle) < \infty \}.$ Our family is regular, which means $\Theta$ is open. We have that $A$ is strictly convex ...
I am trying to understand the Bernoulli example for the biais given in Deep Learning by Bengo et. al. in 5.4.2: Consider a set of samples $\{\color{red}{x^{(1)}, . . . , x^{(m)}}\}$ that are independently and identically distributed according to a Bernoulli distribution with mean $\theta$ : $$ P\left(\color{red}{x^{(i...
Question Suppose I have a random variable $X$ with CDF, $F(x)$, and I want to model an IID sample $\{X_1, \cdots, X_n \}$ of size $n$. For any order statistic $X_{(k)}$ for this sample where $1 \leq k \leq n$, is there a corresponding order $p \in \mathbb{R}$ for the generalized mean on this sample such that $X_{(k)} =...
I'm running a linear regression model to understand the affect of my treatment (reminders) on my outcome variable (Class attendance). I ran my model with two dummy covariates (age and previously attended class) along with the interaction of these dummies with treatment. The table below shows the results of the regressi...
I have two cohorts, Long COVID vs control. They have been using a fitness tracking device for two months. I want to see if there's a significant difference in Sleep stages, Resting HR, and step counts. However, the fitness tracker I am using does not produce perfect results! How can I mitigate that? More specifically, ...
Suppose there is a system in which: Individuals are measured only at discrete time points (e.g. blood pressure is measured once every year) These individuals have the ability to transition between "multiple states" (e.g. disease free, disease stage 1, disease stage 2, death by disease of interest , death by comorbidit...
Let $\Phi (\cdot)$ be the cdf of the standard normal distribution. Given $(y_t)_{t \in \mathbb N}$ a time series. Suppose $F(y_t | \mathcal{F}_{t-1})$ is the conditional cumulative distribution function of $y_t$ given the past information, evaluated at $y_t$, where $\mathcal{F}_t$ is the information set up to time $t$....
When analyzing the results of an RCT, it is not uncommon to see a unit (e.g. cluster) fixed effects in the linear regression model but I have never seen time fixed effects while time FEs are pretty much mandatory in quasi-experimental settings. Is there a reason? I am thinking maybe it is related to statistical power a...
Assume I have two different datasets $D_1$ and $D_2$. Each of these datasets has a different number of samples $|D_1| = m$, $|D_2| = n$. Assume each sample is i.i.d drawn from the same underlying distribution $\sim \mathcal{N}(\mu, \sigma^2)$. Then for samples $s$: $P(D_1) = \prod_{i = 1}^m p(s_i)$ and $P(D_2) = \prod_...
Lets say I trained a random forest on classes 0,1,2 as seen below. Now I predict the classes probabilities with random forest for new points A and B. Would I get... For point A a probabilities classes of: 50% - class 0, 25% class 1, 25% class 2? For point B a probabilities classes of: 90% - class 0, 5% class 1, 5% clas...
I cannot for the life of me figure this out. The context is from game theory (source: Game Theory by Fudenberg, Tirole): ... the space of mixed strategy profiles is denoted $\Sigma = \times_i \Sigma_i$ with element $\sigma$. It also appears (I think) in A symmetric Nash equilibrium is a Nash equilibrium $\sigma \in ...
I am doing data analysis for my Masters research and which includes some Likert scale type questions. I have been calculating some distances between the responses for these questions. All this has gone well with the exception of calculating the Earth Mover distance. I understand the intuition behind the Earth Mover di...
I have a little trouble understanding the solution to the following problem. To my understanding, coefficients in OLS should follow t-distribution. However, the solution says it follows Normal. Please see the answer in the picture
I have different mixed populations where everyone as received a treatment among a list of treatment (let say Ta, Tb, Tc....). I know how many received each treatment. For each population, I know how many have the outcome O1, O2, O3 and O4. Population Ta Tb Tc .... Tn O1 O2 O3 O4 1 0.52 0.15 0.1 ... 0.05 0.80 0...
Context To make the coefficients of regression coefficients comparable, one usually rescales by the standard deviation (see case 3 below). This means that the different regression coefficients can be compared in terms of their effect size (e.g. when the coefficient for x1 is 2 and that of x2 is 4, the effect of x2 is t...
I have created a density plot with ggplot for the predictions of Logistic regression (probabilities). I do not understand the y - axis. Why the range is not 0-1?
I'm taking a stats class, and we're working in R and doing a bunch of different types of regression. Where I'm having issues is that we're doing an F-test on nested models (or a partial F-test, I think?) #Create the complete model fit_complete <- lm(wage_growth ~ unemployment + gdp + unemployment:gdp + I(unemployment^2...
I'm having some trouble understanding how standardisation plays into cross-validation with the lasso. Let's say we want to perform standardisation for the cross-validation process. I can see why we shouldn't standardise before the train/test split, because that would be information leakage. On the other hand, when we r...
I was asked to analyze the effect of multiple interventions on a self-reported indicator (5-point Likert-scale). Essentially, there are 23 individuals who went through 5 "interventions", and after each intervention, they answered some question on a five-point Likert-scale. I want to know whether the interventions chang...
Suppose I use the same p and q, are the two models below theoretically the same? ARMA(p,q) on 1st order differenced y ARIMA(p,1,q) I am aware of this post. But I would like to know are they conceptually the same model besides the minor differences in numerical optimization? Also, if I run these two models, can I comp...
As I understand it from Wikipedia, de Finetti's theorem says: "Exchangeability implies that variables are conditionally independent given some latent variable". Is the converse true as well?
After logistic regression analysis using gtsummary package in R, I got p-value, odds ratio and 95% confidence interval as below With the p-value>0.05, however, 95% CI did not include 1. When changed the confidence interval to 99%, I got the result as below What did I wrong with my analysis? What should I do to get th...
A recent high profile paper claimed to have found signals of harm from a particular intervention, which to avoid bias I'll refrain from identifying. The methodology is unusual and result controversial for several reasons, but to be fair I was interested in taking the results the authors reported at face value just to c...
I am calculating an incidence risk (r): number of cases of a disease in a population over one year (c) divided by the total mid-year population (N). $$ r = \frac{c}{N} $$ Let's assume that c is a precise measure, with no uncertainty around it. N, however, is a point estimate. I also have a 95% CI around it: $$ N=125 $$...