instruction
stringlengths
9
38.7k
I'm interested in studying user preferences regarding streaming content. Given a discrete number of categories (ex: adventure, horror, comedy, family, drama) and the amount of time a given user watches content of each genre, the per user per month per genre percentages could be determined user, month, genre, percent --...
I am having bit of difficultly understanding the process of using censored data. I know there are plenty of R packages that can do this for the usual two-parameter Weibull likelihood formula, but I would like to apply it on an extended Weibull model that incorporates more parameters. Hence the need to incorporate a cus...
I know that two data sets can have the same Kendall's $\tau$ but different Pearson's $\rho$. What about the opposite? Can two different data sets have the same Pearson's $\rho$, but different Kendall's $\tau$? Or rather, if we know the correlation matrix Pearson's $\rho_{ij}$, does it correspond to precisely one matri...
For one of my analyses, I have to find cases that are most different from my cases. It's like case-control matching, but "controls" should be as different as possible. What would be a good method to do this? Thanks!
I have a GitHub dataset of three variables (star_count, fork_count and watch_count) for each repository. Now, I want to find a popularity score using the three variables. For example, I can normalize the value of three variables and take average to calculate the popularity score for a repository. Now, I will average th...
Suppose I performed 10 measurements, and have the dataset: 17.39 +/- 0.05 17.47 +/- 0.04 17.49 +/- 0.05 17.56 +/- 0.05 17.43 +/- 0.05 17.54 +/- 0.05 17.43 +/- 0.05 17.41 +/- 0.05 17.43 +/- 0.05 17.44 +/- 0.05 What is the error on the mean? The standard deviation of the measurements is 0.0528. But this ignores the indi...
I'm trying to estimate a model where the data can be partitioned into subsets that each depend on a single parameter value, where the set of these parameters follow a known distribution. Because the data can be partitioned, I can consistently estimate each parameter separately on the relevant partition of the data usin...
I'm using Python statsmodel to do logistic regression. I'm trying out their glm(family=sm.families.Binomial()) and logit() models. Please correct me if I'm wrong but technically they should be the same model. Here are the full sample code for reference glm_model = sm.formula.glm("Y ~ X1 + X2 + ... + Xn", family=sm.fami...
I have several ranking distributions and would, for each one, like to fit a [Zipf distribution][1], and estimate the goodness of fit relative to some standard benchmark. With the Matlab code below, I tried to do a sanity check and see if a "textbook" Zipf rank distribution passes the statistical test. Clearly something...
Let's say you want to train a model so that you can make some predictions when you get some future data. You find some training data. Some of the training records have labels but other records do not. One approach might be to apply semi-supervised machine learning involving two separate models. The first model trains o...
I have financial data errors (from linear regression) that form a fat tailed distribution, I would like to calculate confidence intervals using that distribution, but I am not sure how to do that due to the fat tails?
I have a dataset of about 100 records and about 80% of those records belong to one class. The rest belong to another class. I'm building two Bayesian models (logistic regression and multiple linear regression) with the Bambi python library which runs the NUTS algorithm for approximating the posterior distribution of th...
When a variable is binary, it sure seems like its distribution is totally characterized by the probability of being in one group: the variable takes one value with probability $p$ and the other value with probability $1-p$. This is essentially a Bernoulli distribution. But... There is a beta-binomial distribution, whic...
My dataset contains multiple continuous predictors (responses from n neurons) from which I would like to predict two categorical variables (A and B), where B is nested under A. A can take 8 different values, while B can take only 2 values within each level of A. My question is, what would be the best model to use this ...
I'm trying to select feature columns in a binary classification model. I'd like to remove near-constant columns that don't predict the target column values very well. One way of defining this is the number of times a constant values occurs in parallel with a positive classification. I can create dummy columns with the ...
I have a set of businesses that have invoices from clients each day. I use this year-over-year to find how transactions have grown each year, i.e. 2 invoices Sep 2021 and 3 invoices Sep 2022 is (3-2)/2 = 50% yoy txn growth. I want to find a method to discern (preferably in Python) if a business has significantly more o...
I have a dataset I'd like to break into 2 to 3 subsets to account for outliers. Train the subsets with individual classifier and combining them. Understand that Bagging uses subset of the base training set. However, it is randomly selected for each classifier. Therefore, is it possible to allocate specific training sub...
The example section of Wikipedia's article on Statistical model says: Suppose that we have a population of children, with the ages of the children distributed uniformly, in the population. The height of a child will be stochastically related to the age: e.g. when we know that a child is of age 7, this influences the c...
I'm working on a rental price prediction project and I want to make sure I'm evaluating things correctly. Basically, after I fitted some models with the data and compute R-squared on training and testing, the gap between them is a bit too large, the score was like 0.68 on testing but 0.76 on training. This is clearly o...
I was under the impression that changing the scale/normalizing the target variable in a regression task would not change the overall shape of the loss function equation but would simply translate/move it somewhere else. Therefore, putting bad weight initialization aside, the network would be able to converge the same w...
Question is based on the screenshot attached. Based on paper here. I am not being able to understand why min max formulation (eq 4) is first converted to max min formulation (eq 5). Is it something required to apply strong duality? Also why is max min formulation (eq 5) again converted to min max formulation (eq 6)?
I am tasked with solving a question for a qualifying exam, but I am a little lost about this question. Let $\eta$ and $\xi$ be two independent standard Gaussian random variables. Find $\mathbb{E}(\xi\eta \mid \xi - 2\eta)$. My attempt: My main idea is to show that $\operatorname{Cov}(\xi-2\eta,\xi+2\eta)=0$, making t...
I have gaussian random variables $(Z,Z_k)\sim N(0,\Sigma)$ and $u\sim\text{Uniform}[0,1]$. Given that \begin{align*} y=(1-\boldsymbol{1}\{Z>C\})\boldsymbol{1}\{u<\rho\}+\boldsymbol{1}\{Z>C\}\boldsymbol{1}\{u\geq\rho\} \end{align*} where $\boldsymbol{1}\{\cdot\}$ is the indicator function, and $C$ and $\rho$ are fixed c...
Question: What are influential, canonical, or otherwise useful works considering low-probability events? My background: Applied or computational statistics, not theory or pure statistics. How I describe it to people is that, if you ask me a probability problem, I am going to solve it using simulation instead of being a...
I have a dataset (say N=200) of which a subset (N=150) have undergone a certain assay. I want to be able to say that the subgroup N=150 is not significantly different from the entire population (N=200). Is there a way to compare the two eg in terms of baseline characteristics. I tried comparing the N= 150 who have t...
The facility I am working in can be assessed a number of violations. I have a list of the violations and the date of the violation. The violations range from 1 (least severe) to 7 (most severe). We've only ever received one "7" violation. What I'm trying to do is visualize that the bulk of the category "6" violations w...
I'm training a binary classification model on a fraud dataset. The dataset has 300 columns and 40,000 rows and I don't have a lot of computational power. I've removed constant columns from my dataset but I still have about 80 near-constant columns left. "Near-constant" here means 98% a single value, with < 5 unique val...
I have a function $s(\omega)$ that is a sum of a function with random numbers $a_m$ and looks something like the following. $$ s(\omega) = \sum_{m = 1}^{M} f(a_m, \omega) $$ where all the $a_m$ are draws from a probability distribution. I have the expression of the expectation of the sum when $M \to \infty$ $$ \mathbb...
I'm creating a binary classification model on a fraud datatset. I have 300 columns and 40,000 rows. About 80 of these columns are near constant. I'd like to remove them because they're slowing down training, but I'm worried they could have predictive power. What's the best way to analyze these columns and check if remo...
I've read that some models, such as decision trees, don't require scaling to work effectively. However, the author of the linked article states there's no downside to scaling data for a decision tree either. In general, is there ever a downside to scaling data? Edit: For example, using SciKit-Learn's StandardScaler on ...
I want to know what model I should use to make causal inferences with time series variables with the instrument variable method. For instance, I want to estimate the effect of price on sales. I have an instrument variable for the price variable. Price and advertisement are endogenous and non-stationary. $Sale_t = Price...
when testing for normality and homogeinity in SPSS, it showed this: I use shapiro-wilk result, and it shows that E25 is not normally distributed. but the homogeinity based on mean showed that it is homogen. what test should i use?
I am a bit loss with the convergence in probability and the absolute value. Let $X_n$ be a random variable defined in $\mathbb{R}$ with $\lim_{n \rightarrow \infty} E[X_n] = a$ and $V[X_n] = O(n^{-1})$. Then, we know that by applying Chebyshev's inequality $$P(|X_n - a| > e) < O(n^{-1})$$ which means that $X_n$ converg...
I'm learning about Gaussian process functional regression but the more I learn, the more questions arise. So we want to estimate a function $f\left( x \right)$ from data $D = \left( {\left( {{x_1},{y_1}} \right),...,\left( {{x_n},{y_n}} \right)} \right)$ by updating a ${\text{GP}}\left( {m\left( x \right),k\left( {x,x'...
Imagine the following dataset. 1 --> Person buys this product sometimes 0 --> Person never buys this product: Noodles Rice Pickles ... Chewinggum Money spent Person 1 1 0 1 1 1000 Person 2 0 0 0 1 150 Person 3 1 1 ...
I'm trying to use either pracma::quadprog or quadprog::solve.QP in R to solve a ridge regression, which can be written as a constrained optimization: $$\begin{aligned} minimize \ \frac12|| y - X \beta||_2^2 \\ s.t. ||\beta||_2^2 \leq t \end{aligned}$$ While both functions can solve $$\begin{aligned} minimize \ \frac12x...
Consider $X_n$ a random variable that converges in distribution to $X$ and $R_n = o_p(1)$. Then, by Slutsky's $X_n + R_n \rightarrow_d X$. I already proved that for a function $f$ continuous, nonlinear, unbounded $$\lim_{n \rightarrow \infty}E[f(X_n)] = \lim_{n \rightarrow \infty}E[f(X_n + R_n)] = E[f(X)]$$ and that $$...
I am conducting a prediction using the LASSO probit model with a dummy on the LHS and several interacted variables on the RHS. My question is: can I meaningfully estimate the Average Marginal Effect of my individual predictors if I also use the penalised coefficients for prediction? If yes, could you please recommend w...
I have 8 means referring to 8 groups. Since I have the numerosity of each group, I can calculate the mean of the means. How can I calculate the standard deviation of the mean of the means?
I have a question about a mixed model I'm running. The formula is the following: DV ~ Combined * Sex * Arousal + (1 + Combined | Subject) + (1 | Item) My question concerns the factor "Combined". I created it by combining two separate factors plus the common baseline for both factors: Emotion (anger, happiness) and Cha...
below is my ADF test for regression residuals. I use alpha=5% My interpretation is : my residuals are non-stationary as my model does not take into account the 4 lags suggested by ADF. In other words, my residuals would be stationary only if i take in consideration the 4 lags in the model Is this correct?
Can anyone explain the linearity of expectation in an intuitive way? I have been trying to understand this for far too long now. Please don't use any equations and such, try to use real world examples or simple tools such as couples, red cards black cards etc. For example, if there are 4 red cards and 5 black cards, th...
I'm working on my master's in developing a machine-learning model to predict classes of biomedical images from a microscope. These images are collected separately from each patient. For example, I have ~70 cases and each one of them contains ~50 images (small dataset). collected with different conditions. For example,...
I find myself trying to solve a peculiar stopping time problem. Let $\{X_i\}$ be set of continuous random variables of a stochastic process, each with finite mean value $\mu$ and standard deviation $\sigma$. I am interested in finding the expected value of the stopping time $\tau$ given by: $$\tau = \inf_n \left\{ \lef...
I have two time series $X_{t,A}$ and $X_{t,B}$ with an index (2015=100) as unit of measure. To be more concrete, my two time series are the index of the level of employment in countries A and B. I want to sum both of them. Of course, it does not make sense to do $X_{t,A}+X_{t,B}$. I do not have the time series of the l...
should it be advisable to standardize/scale the data on each subset of cross validation, or would it be enough to do it once with the full set? My question is related to the fact of including or not the scaling phase in a pipeline This: from sklearn.linear_model import LogisticRegression from sklearn.model_selection im...
I'm new to mixed effect models, but I think I should use a crossed random effect model: V ~ A + (1|B) + (1|C) + (1|D) + (1|P). Could you please tell me if I'm right? I ran an experiment with 10 participants. Each participant had to complete several trials. My analyses include: 1 continuous dependent variable V. 5 cate...
I have a model that works well on predicting the target variable $Y$ on time $t$ based on the input variables $X$. However, since I need to predict the $Y$ at $t+1$, for which I don't have the data (the $X$) for $t+1$. I decided to fill the void with Monte Carlo simulation. However, when feeding the simulated $X$ at $t...
I want to compare the response from three levels of one factor. I do lengthy and fairly expensive experiments, and cannot increase my sample size (often 3 measurement replicates on the same solution under different conditions). My first thought was to use one-way ANOVA, but checking for ANOVAs assumptions (normal samp...
I'm training a neural network on a regression problem. I wanted to compare between (1) Gaussian negative log likelihood (GNLL) loss (the output of the network is the mean and log variance) and (2) the MSE loss (the output of the network is the mean only). I noticed that when using MSE, the MSE loss gets close to zero. ...
I had this question from a quiz in my stats class: Which of the following is NOT a correct way to specify the assumptions needed for inference about the parameters of a Simple Linear Regression Model? A. The experimental units are randomly selected, the responses are Normally distributed, and there is a constant varian...
Given a questionnaire whose questions have different numbers of options available say having questions with ratings from 1-2 and 1-5. Could I use polytomous models such as a partial credit model to study the questionnaire data?
I've read that ChatGPT will sometimes give different answers to the same prompt. In other words, there is an element of randomness. Where does this randomness come from? Is there some sort of component in transformers or in ChatGPT's implementation specifically that's like a variational auto-encoder where you can feed ...
I'm trying to calculate a 2x2 covariance matrix in Cartesian coordinates that represents the amount of uncertainty when rotating and translating a point in 2D space, $\Sigma = \begin{pmatrix} \sigma_{xx}&\sigma_{xy}\\ \sigma_{yx}&\sigma_{yy} \end{pmatrix}$ The position of a point in 2D space is represented by a vector,...
I have 2 separate Bayesain networks and I was hoping to maximize Value within the constraint of the Cost. What are is a good way I can do that? Some notes about the model: Cost is observed per unit, but there is a global constraint on Cost. Value is not observed, so latent. Function between Cost and Value does not exi...
I've seen the term "oversampling" used in a survey design methodology context and in a machine learning context (e.g. methods like SMOTE). I'm intrigued by the differences between the two. So far, here's what I understood: The purpose of oversampling in survey design is to reduce the variance for a target sub-populatio...
Suppose that Walmart has 100 stores. It has a coupon for cereal, and it wants to know if the coupon increases cereal sales by a significant amount. Walmart puts the coupon on the cereal shelf in 10 stores; let's call this the treatment group. The other 90 stores do not the the coupon; let's call this the control group....
I want to model survival outcome as a response to stem length for a plant species. All individuals within plots were tagged and sampled in year 1, then re-found and sampled again in year 2, with an interval of one year between measurements. The variables include fate at year 2 (survival = 1, death = 0) and length (norm...
I have a problem that I can't solution. Let $\mathbf{X}=\{X_1,X_2,\ldots,X_n\}\sim\mathrm{Uniform}(0,\theta)$ and we have $H_0:\theta=\theta_0$ and $H_1:\theta>\theta_0$. We reject the $H_0$ when $X_{(n)}>c$. Find $\mathbf{p\textbf{-}value}$. I know that $\mathbf{p\textbf{-}value}=\mathbb{Pr}_{\theta_0}(T(\mathbf{X})>T...
I have what on the surface seems like a simple problem but I cannot figure out what is the appropriate test -- I am not a statistician... I am trying to determine an appropriate metric to stratify patients in regards to getting toxicity (essentially trying to find a constraint so we can avoid it during treatment) In gr...
I am struggling analyzing the correlation between two variables in my experiments. It turns out that I now that when the SNR of the signal (the definition of the signal with respect to the noise) is high, the algorithm gives a better score. However, from the SNR-Score plot, I cannot see that relationship or at least it...
I want to create a model to predict a numeric improvement (e.g. reduction in a numeric parameter) after surgery. For that I want to choose the best predictors from a list of about 30 patient characteristics (numeric and categorical). My problem is that in my data set of about 250 patients almost no patient is a complet...
I am wondering what I am doing wrong with the parameterization of the OU process for day-ahead electricity prices on a weekly resolution. The fitted parameters do not produce satisfying results, as the simulated paths do not look as if they correctly reflect the volatility. For the calculation, I followed the paper by ...
$Xt-0.4X_t+0.03X_{t-2}=Zt-0.4Z_{t-1}$ This process is causal and invertible. For the $MA(\infty)$ representation, I wrote it as $X_t=\frac{1-0.4B}{1-0.4B+0.03B^2}Z_t$, where $\psi(B)=\frac{1-0.4B}{1-0.4B+0.03B^2}$. So, $X_t = \psi(B)Z_t=\sum _{i=0}^{\infty }\:\psi _i\:Z_{t-i}$ Now, I want to find the acf, this is where...
A stick of length 1 is split at a random position $B$ where $B$ ~ $U(0, 1)$. Let $X$ be the length of the longer stick. What is the CDF of $X$? This problem is challenging me. I know that the cdf of X is $F_x(x) = 2x-1$ when $0.5 \le x < 1$, and $0 \text{ when } x < 0.5 \text{ and } 1 \text{ when } x \ge 1$. My trouble...
Based on the results table of the existing CoxPH model, is it possible to calculate the standard error when using the relevel function? Like this... when 2 vs. 1(ref), exp(coef) 0.96712/0.97700 = 0.9898874 se(coef) ??/?? = ?? > coxph(Surv(time, status) ~ Trt, data = data) Call: coxph(formula = Surv(time, status) ~ Trt...
First, I don't believe this is a duplicate post even though this topic has been brought up a million times. If it is, please point me to the relevant post and I will remove this one. I am basically trying to understand what this post implicates in a practical sense: Independent samples t-test: Do data really need to be...
The data Consider some simulated data: x <- rep(c(0, 6, 13, 27, 37, 82, 119), 16) # predictor set.seed(10) e <- rnorm(x, mean = 0, sd = 4) # error a <- 10 # intercept b1 <- -0.2 # slopes b2 <- -0.05 b3 <- -0.3 b4 <- -0.4 y <- a + c(b1, b2, b3, b4) * x + e # linear response set.seed(15) sd <- rexp(y, rate = 1) # measure...
The problem is stated as: Suppose $X, Y$ are independent and $X \sim \mathcal{N}(\mu_1, 1), Y \sim \mathcal{N}(\mu_2, 1)$ with unknown parameters $\mu_1, \mu_2$. Prove that unbiased estimation of $\theta=\min \left\{\mu_1, \mu_2\right\}$ does not exist. Here's my sketch: Let $p(\mu, x)$ denote the pdf of $\mathcal N(...
According to Burda et al (2015) number of active units is computed as: $ Cov_x(E_{z \sim q_\phi(z|x)}) > \delta $ for some particular delta. In the paper it is set to 0.02 empirically. But this only measures units in vector z that are mostly constant. Another way of prior collapse for VAE is random units in z, i.e. - u...
I have a dataset of cars and want to model a variable called average daily driving distance. The variable was calculated before I received the dataset as: average daily driving distance = total driving distance in the days between last two inspections / days between last two inspections. However, I only have access to ...
The Ljung-Box and Box-Pierce tests make use of the sample autocorrelation $$ r_k = \frac {\sum_{t=k+1}^n a_ta_{t-k}} {\sum_{t=1}^n a_t^2}$$ and the Ljung-Box test exploits the result that $$Var(r_k) = \frac {n-k}{n(n+2)}$$ Here, the lag order is $k$, $n$ is the length of the series, and $a_t$ is the (true) error, and t...
I was doing a project where my target variable is a count variable. So naturally my mind went to Poisson regression, but upon further inspection, any identical set of my explanatory variables can result in multiple values of the target variable. Will my model work under this case, or should I apply something like LSTM?...
I am doing a 2SLS-model in R with panel data (n=800), where I want to include an interaction-term as Instrumental-Variable in the first-stage model. My first question is: Does that even make sense? The idea is that only the interaction term works as a good IV for X on Y. 1. Stage-model: first_stage <- plm(X ~ (Z(a) * Z...
There is a quite old yet very good question about the proper way for using rfImpute but to me the question raised by Doug7 (whether the target variable y gets used for the imputation of the features Xi and whether that would be harmful later when trying to fit models to the new imputed data set) has not really been ans...
I know that I have to use the same datasets and experimental settings. In this way, I don't have to run their codes. What if I used different datasets? Is it OK to use their code from GitHub to get the accuracy for the specific dataset? If so, how do I find the best code that will run without many errors? Because I spe...
I am performing classification on an imbalanced dataset (70% negatives). If a prediction is negative I take a specific action otherwise an opposite one. As in both cases some costs are implied, I want to assess how good the model is at detecting each class. To do so, I am calculating TP/(TP+FP) and TN/(TN+FN), along th...
I know the following influence function for a M-Estimator: $IF(x_0,T,F_0)= $ $\frac{\psi(x_0)}{\mathbb{E}_{F_0}[\psi'(X)]}$ where $F_0$ is the centered model ($F_{\theta}(x)=F_0(x-\theta)$) I am interested in knowing the influence function for the general model: $IF(x,T,F_{\mu,\sigma})$ I know that it must be $IF(x,T,F...
I'm using matchit package to create a propensity match. I'm trying to match control and treated with a 2:1 ratio in order to maximize the population and exclude less patients as possible (13.000 patients available). I have found two possible ways and I am wondering which one is better: method=nearest, ratio 2:1, min.c...
I am attempting to recreate the results of the paper written by King, Stock and Watson in 1995: Temporal instability in the unemployment inflation relationship. The paper estimates a VAR model with 12 lags using data on inflation and unemployment. They mention that they obtain in sample RMSEs for forecasts at the 6, 12...
As the title stated, $X_n$ converges to $X$ in distribution. $Y_n$ converges to $Y$ in probability. Does $(X_n, Y_n)$ converges to $(X,Y)$ in distribution? If not, if we make the condition so that $Y_n$ converge to $Y$ almost surely, does $(X_n, Y_n)$ converge in distribution to $(X,Y)$?
Popular python libraries for topic modeling like gensim or sklearn allow us to predict the topic-distribution for an unseen document, but I have a few questions on what's going on under the hood. I've read a few responses about "folding-in", but the Blei et al. LDA paper the authors state. " An alternative approach is ...
I was reading this paper when I stumbled upon two-staged PCA; apparently it divides indicators into sub-indices because empirical evidence supports that PCA is biased towards the weights of indicators which are highly correlated with each. I was wondering how to make sense of the step by step process and how to perform...
I want to evaluate factors influencing the time to degree for college students in their master's degree with panel data. The dependent variable is time to degree in months (reference: student is still studying). However, I must respect the time to college dropout as a competing event. The data is in person-month (long)...
In section 4.7.7 of Introduction to Statistical Learning (version 2), the authors code regression contrasts where the last level of a predictor sums to the remaining levels. My question is, why doesn't the coefficient for this last level (e.g. mnth12) show up in R's summary output? The authors note that it's not report...
I have two replicates (tanks) for 4 treatments (hyperthermia, hypoxia, combined hyperthermia and hypoxia, and control), with 10 randomly assigned organisms for each tank. The response variable is non-normal. I have tested for treatment effect through Kruskal-Wallis H and Mann-Whitney U test (Wilcoxon) as posthoc analys...
Given some probability space $(\Omega, \mathcal{F},\mathbb{P})$, $F_{n}$ some filtration, and $X_{n}$ some martingale with $\tau$ stopping time. We know some major things such as $\tau$ is finite almost surely, $\mathbb{E}|X_{\tau}|$ is finite, and $\lim_{n\to\infty}\int_{\tau>n}|X_{n}|d\mathbb{P}=0$. The goal being to...
I collected data among individuals- I took noted screening results they had within the last year, collected a baseline screening, and another follow up 3 week screening. I’m comparing the 3 screenings to determine changes (does more frequent screenings teach us anything?) I’m thinking chi-squared? But not completely su...
Explaining my dataset: I have a univariate timeseries dataset of energy consumption. Each row of the dataset are half-hourly records of the energy consumption of a consumer. So every 48 lines contain 1 full day of measurements of a single consumer. So, for example, the first 48 rows (rows 1 to 48) of the dataset contai...
I am wondering the best approach to plot what I want. I have 4 dataframes of data (2 types of data with 2 replicates for each type). To tis point, I've just been choosing he best replicate of each type and plotting that. However, I think to be more accurate, I should include both replicates in each line. What is the be...
For some reason my model keeps showing up to be a poor model when checking its accuracy through confusion matrix and AUC ROC. This is the model i stuck with after doinf backward elimination this is the logistic output: `Call: glm(formula = DEATH_EVENT ~ age + ejection_fraction + serum_sodium + time, family = binom...
Are all terms in the first line(71) of the equation random variables or probability density functions? If they are probability density functions, is there a possibility of obtaining a value that is not equal to 1 when integrating the right-hand side of the equation after all calculations have been completed? Based o...
Suppose I have data in R that looks like this. This data represents measurements of different patients over a period of time (discrete level): df <- data.frame(patient_id = c(111,111,111, 111, 222, 222, 222), year = c(2010, 2011, 2012, 2013, 2011, 2012, 2013), gender = c("Male", "Mal...
I'm starting to get a little confused about how R knows which variable is the main variable and which others are simply controls. For example, let's say there are three variables Y, X1, and X2, and I'm mainly interested in X1. I regress Y = constant + X1 + X2 + error. The function of X2 is to block any indirect effect ...
I would like to know if there is any drawback to increasing K in K-fold CrossValidation, except the computational one.
I have run model selection and have been advised to use the BIC value to determine the best model for my purposes. However, having looked around online I cannot seem to find a standard way to report results, even published papers have different ways of reporting them. Could someone please tell me how to report the BIC ...
I am seeking an expression of the Jensen-Shannon Distance (JSD) between two normal distributions that only uses the respective means and standard deviations. The continuous version of the JSD (in nats) is given as: $$\sqrt{\frac{1}{2}\int_{-\infty}^{\infty} \left(f(x)\ln\frac{2f(x)}{f(x)+g(x)}+g(x)\ln\frac{2g(x)}{f(x)...
Cohen's d and Hedges'g effect sizes are used when two distributions have equal variances, which is a requirement and assumption to use these statistical tests. When two distributions have unequal variances, Glass'delta should be used instead, putting in the equation only the standard deviation of the control/pre-measur...
I came across a paper which reported the following results Accuracy Specificity Sensitivity 97.49% 93.6% 94.3% It seems unusual for accuracy to be higher than both sensitivity and specificity. Is this an error in reporting? I looked at this question which suggests that this is possible for precision and rec...
I'm relatively new to causal inference, so please be gentle. I have the above DAG, which represents the following variables: G: exposure variable, two factors (control and treatment) S: Pre-treatment variable, Continuous PT: Post-treatment variable, Continuous Y: Outcome of interest, Continuous Is there a way to est...