instruction
stringlengths
9
38.7k
I am learning Gibbs Sampling for GMMs. Particularly, given $\boldsymbol \theta$, I must sample from the latent $\boldsymbol z$ before sampling $\boldsymbol x$. The PDF of $\boldsymbol z$ is given as$$ P(z=k|\boldsymbol x,\boldsymbol\theta)\propto P(z=k)\mathcal N(\mu_k,\Sigma_k) $$ for $k=1\cdots.K$ and by assumption, ...
I am using xgboost (in R) to predict a continuous non-negative target variable using standard root mean squared error as an evaluation metric (and loss function). However, as pointed out in this post, it is possible that a non-negative target sometimes receives negative predictions. Since I have many training values in...
In Rubin 1990, Donald Rubin describes four different modes of statistical inference for causal effects: Randomization-based tests of sharp-null hypotheses - in the tradition of Fisher, if you've got an unconfounded assignment mechanism combined with a sharp null hypothesis of no treatment effect, you compute the value...
I'm working on a project that does simulations / measurements where we measure values between [-1, 1] (but we also use absolutes [0, 1] to make life simpler). It's 'good' when everything is as close as possible to zero. It's 'bad' when a few measurements (even a single one) is larger than 0.05 and 'critical' when close...
I am running a basic difference-in difference (DiD) model. I would like to explain the effect of increasing the price of fares for students only. I use DiD with adults as a control group. I have monthly data of tickets sold for each category. To avoid seasonality I have data before treatment, that is from April 2021 - ...
How to understand and explain the sign of variable changes after including its square in a regression? For example, in a regression, X loads negatively, but X loads positively after further including the square of X. Does this means something wrong with the regression specification or not? Do we need to take some measu...
I found the predicted hazard (the h(t) of Cox regression) through Predict() and cph() in rms package was different from common coxph(). URL <- "https://socialsciences.mcmaster.ca/jfox/Books/Companion/data/Rossi.txt" Rossi <- read.table(URL, header=TRUE) Rossi[1:3, c("week", "arrest", "fin", "age", "prio")] # looks l...
I'm consulting with a local quantitative person about some data, it's double-censored. Left censored is below limit of quantitation. Right censored is saturation of the assay. I want to regress it against a simple numeric predictor. I was just told that using survival analysis may not be appropriate because "the censor...
I have a large dataset (1,465 observations, >50,000 predictors). I conducted a LASSO regression using glmnet in order to perform variable selection, then I ran a simple logistic regression model to test associations with the 15 predictors that were left with non-zero coefficients after LASSO. After the simple logistic ...
I want to build a database of devices performance on various tests so that I can compare devices on a single test. Unfortunately not all reviewers review every device, this leaves holes in my data that prevents comparing every device in the dataset on every metric. But there is enough overlap of measurements of the sam...
Fundamental question: I have one dataset which I have used to build and generate a model for survival prediction. Here I get like 40 genes as my predictor which I have tested both in my test and train dataset so for this I have used the TCGA cohort. Now to test in an independent data I have chosen another patient cohor...
I calculate models that describe measured data. Most people in the field don't attempt anything statistical (the models have many potential sources of uncertainty). However, I want to do a better job and see hints that expectations are changing. I can't find any resources (that are simple enough for me to understand)...
Edit: after skimming this paper6, I narrowed the scope of this question to NLP problems. Relevant excerpt from the abstract (emphasis my own): We demonstrate that unsupervised preprocessing can, in fact, introduce a substantial bias into cross-validation estimates and potentially hurt model selection. This bias may be...
In the case of a point treatment, the average treatment effect among the treated (ATT) is the treatment effect standardized to the subset of the sample that received treatment $A=1$ as an estimate of the treatment effect among patients who would receive treatment in the population. In the potential outcomes formulation...
I need to calculate the values for certain return periods of a flood event (up to 5000). It has to be GEV with method of moments and Gumbel with L-Moments. But I am not sure about how to calculate Gumbel, because I don't know how to implement the parameters and for the GEV I also didn't find any good example where GEV ...
I make this kind of scatterplot a lot and was curious if it had a proper name. The diagonal line is when the two variables have the same value. The observations that occur above the line have a greater value in the y axis and below the line have a greater value in the x-axis. The vertical and horizontal distance from t...
I am doing propensity score weighting with the package "Weightit" and I want to have a Table 1 "Before and After Weighting" like this one: As you can see, data are displayed EITHER as MEAN±SD or frequency(percentage) depending whether the variable is continous or categorical. I want to do the same thing. This is my co...
I am trying to build a regression model to find the correlation between the features of thumbnails and the popularity of videos. I am proposing that category of videos is the moderator of the correlations, and I selected two categories for comparison (dichotomous). As I have 3 independent variables (features of thumbna...
This is the example I'm referring to, it is taken from Mostly Harmless Econometrics: An Empiricistís Companion by Angrist and Pischke: Suppose that we are interested in whether children do better in school by virtue of having started school a little older. Maybe the 7-year-old brain is better prepared for learning tha...
if I consider the Bayesian network in the picture below: https://i.stack.imgur.com/nZKN2.jpg So A is the parent of C,D and B. But B is also the parent of D. Is it then correct to write: P(D | A) = P(D | A,B) * P(B | A)? Also, if I hav this formula for the full joint probability P(A,B,C,D) = P(D | A,B) * P(B | A) P(C | ...
Background: Let $X=[x_{j,k}]_{j=1,\ldots,p, k=1,\ldots,n}$ be a $p\times n$ data matrix. Each column is an i.i.d. $p$-dimensional centred random vector. One can compute the sample covariance matrix $$S=\frac{1}{n}XX^\top$$ as well as the sample correlation matrix $$R=(\mathrm{diag}(S))^{-1/2}S(\mathrm{diag}(S))^{-1/2}....
I am new to inverse probability treatment weighting (IPTW) and I am trying to understand it. However, I am not a statistician and I am having some troubles with advanced statistics concepts. As far as I understand, with IPTW you can achieve a randomization-like effect. First you calculate the propensity scores and afte...
This definition is excerpted from Wikipedia: The Matérn covariance between measurements taken at two points separated by d distance units is given by $$C_\nu(d) = \sigma^2\frac{2^{1-\nu}}{\Gamma(\nu)}\bigg(\sqrt{2\nu}\frac{d}{\phi}\bigg)^\nu K_\nu\bigg(\sqrt{2\nu}\frac{d}{\phi}\bigg),$$ where $\Gamma$ is the gamma func...
I am using the ss function from the npreg package in R to fit a smoothing cubic spline to my data, where the smoothing parameter is selected by the REML method. The "equivalent degrees of freedom" that is returned after fitting the model is different from the degrees of freedom listed in the model summary printout crea...
I am attempting to perform a CCF analysis between a predictor time series(P_a_cm) and a response time series (delta_total_cm) which represent annual precipitation and annual water table elevation change (one observation per year), respectively. My task is to asses if water table elevation change is dependent on precipi...
Suppose I have a dataset $\{S_t\}_{t=1}^T$, where $S_t\overset{i.i.d.}{\sim}Binomial(n,p)$, how to consistently estimate $n$ and $p$ using this dataset? It would be great if you could provide a method with theoretical guarantee for consistency. I thought about MLE, which does not give me consistency via standard argume...
I am trying to use a multi level model for a study where participants take part in 3 separate sessions where they complete a cognitive task and I measure reaction time. During each session, they complete 3 blocks of the task, so I have 3 measurements per session. Participants receive a different treatment condition eac...
I am a graduate student and now I have a trouble to understand p-value. I watched youtube videos, but they didn't really help. I want to know it a bit in depth. Could you please recommend a book for me?
I have a XGBoost model that consumes ~150 features for a classification problem. Recently, I have a set of ~30 candidate features. I tried to dump everything in the XGBoost with the same hyper parameters (somehow I did not get improvements when tuning the parameters). The performance looks worse than the original model...
Let $(X_1, X_2, X_3)$ be a sample from $Poisson(\lambda)$. Here we test $H_0: \lambda\le 1$ v.s. $H_1: \lambda>1$. Fix $\alpha=0.05$. Find the $\alpha$-level uniformly most powerful test (UMPT). My work: note that the density function has monotone likelihood ratio on $T=\sum_{i=1}^3 X_i$. By Karlin-Rubin theorem, the ...
How do I condition the variance of a normally distributed random variable on two other normally distributed random variables? How do I condition the expectation of a normally distributed random variable on two other normally distributed random variables? NOTE: $Y$ and $Z$ are correlated ($\rho_{Y,Z}$)
If there is a Elastic-net criterion function: $$\mathcal{L}(\boldsymbol{\beta}) = \frac{1}{2}\sum_{n=1}^N(\boldsymbol{\beta}^{\top}\boldsymbol{x}_n - y_n)^2 + \frac{1}{2}\lambda(1-\eta)\|\boldsymbol{\beta}\|_2 + \lambda\eta\|\boldsymbol{\beta}\|_1,$$ and $$\boldsymbol{\beta}_{opt} = arg\min\limits_{\boldsymbol{\beta}} ...
I'm doing reading around regularisation techniques for neural networks. My intuition is that dropout is essentially adding noise into the network by zeroing out activations according to a given probability. Can the same result be achieved by introducing noise into training examples/layers given the same probability?
I am performing a meta-analysis and have a dataset of hazard ratios and odds ratios collected from primary studies. Suppose for a study we have a recorded hazard ratio (HR) (or odds ratios (OR)) (both point estimates and confidence limits) for control (A) vs. several treatments (B,C,D) e.g. A vs. B, A vs. C, A vs. D. ...
Given a set of IID samples $X = \{x_i\}_{i=1}^n$ assumed to be from the density $p(\cdot)$, and the function $h:\mathbb{R} \xrightarrow{}\mathbb{R}$, its expectation can be approximated as $$\mathbb{E}[h(X)] = \int h(x)p(x)dx \approx \frac{1}{n}\sum_{i=1}^nh(x_i) $$ as usual. However, I have recently come across this a...
I've been reading about some psychology stuff and statistics, was just wondering if I should add these percentages. psychopathy prevalence in males 15.8%, and 5.9% in females should I add these to get the general population or should I get the sum divided by two? Would this be 21.7% or 10.85% ?
I have trouble undestanding how to interpret my results. Working with glmm and poisson (link) models. I found one example that is given for negative binomial and how they interpret the results: "Every one-unit increase in the value of math, then daysabs(y) will decrease (-) by 0.9940249 times, provided that other predi...
Let's say, I have a binary classifier. Usually, if a model doesn't learn anything useful, the accuracy would be around 50%. Anything above 50 is better than a random guess. My question is: what are some situations where the model will show below 50% accuracy (or some performance metric), let's say 30%? Doesn't that mea...
I am running a nested 3-block logistic model. In block 1, the odds ratio for Variable 1 (V1) is 2.0 but in block 2 when I enter other variables (demographics) it jumps up to 4.0 which is odd (pun intended). When I run the full model with vars in block 3, the odds ratio returns to the normal values I see in block 1. Som...
I have a few questions regarding the formulation of hypotheses. For example, here are 2 hypotheses: Age will influence the choice of food individuals order at the restaurant. Younger individuals are more likely to order fried food at the restaurant. These 2 are almost the same, yet different. Does one have an advanta...
I am currently doing a study examining on how the outcome variable Y changed over time, and I want to control two time-invariant (gender and ageL2) variables in my model. But I am not sure about adding the "Cov*Time" item Hopefully, the formula should be likelmer(Y~Time+gender+ageL2+(Time|id). But when reading a simil...
I recently trained an xgboost model for a binary prediction task; the dataset had rougly 900 class 1 and 100 class 0 rows. The model didn't fare too well (AUC 0.64) and none of the features had SHAP value to speak of (below 0.01 for every feature). All the predictions were between 0.49 and 0.51, so I got the impression...
I have the following problem. I have 3 vectors $u,v,w$ of n dimensions. I'm able to find cosine similarities between $u$ and $v$, and between $v$ and $w$: $cosine(u,v)$ and $cosine(v,w)$. Can i use these cosine similarities to compute the cosine similarity between $u$ and $v$ $cosine(u,w)$? Thanks
I did a man Whitney to investigate the difference in BDI score between males and females. I got an r effect size of -0.09, what type of effect size is this ?
I find it quite hard to understand what is the state of the art method for a regression task involving a small data set (e.g., ~1000-5000 data points). In some books, we can find linear regression, tree based algorithms, support vector machines, etc. I am wandering if there is now a common agreement on which method has...
My problem:- I'm writing a test to see if a series of numbers come from certain theoretical distributions. And I need a p value so that software can automatically accept or reject $H_0$ on an $\alpha=0.05$ basis. The context:- Does the 2-sample KS test work? If so, why is it so unintuitive? Is the Kolmogorov-Smirnov-Te...
This study shows that the average penis mean is 13.24cm and the standard deviation is 1.89cm. Let's suppose we have a population with this mean and standard deviation for penis length. Suppose we ask 30 men in this population what their penis lengths are. Suppose that the selection of 30 men is so that all men from the...
Suppose X1 is one observation from a population with Beta(θ,1) PDF. Would X1 also have Beta(θ,1) PDF?
probably answered before but I would I want to see if my reasoning is correct, as my textbook skips the calculations but the answer coincide. Q: Let $Z_t \sim \text{WN}(0, \sigma^2)$ (white noise), and define the MA(1) process $X_t = Z_t + \theta Z_{t-1}, t\in \mathbb{Z}, \theta \in \mathbb{R}. $ Find the covariance fu...
Say I want to compare the means of two groups in SPSS (men and women). The particular thing is that for these groups in the context that I'm researching, there are no theories to formulate a decisive hypothesis. So that means I don't know beforehand whether one group will have a higher means than the other or if they w...
I was looking at the Informer model implemented in HuggingFace and I found that the model is implemented with negative log-likelihood (NLL) loss even though it is a model for a regression task. How can NLL loss be used for regression? I thought it is a loss used for classification only.
I work for a company that helps online retailers to group their inventory into google ad campaigns. I am using Causal Impact to determine whether the release of a new feature within our software had an impact on the total impressions that an online retailer received through google ads - an impression is counted each ti...
If X ~ Exp(3), Y ~ Exp(1) and h = X / (X + Y) then h ~ beta(1/3, 1) and E(h) = 1/4. But when I draw random deviates using the following R code, I find mean(h) ≈ 0.324 and the histogram doesn't resemble the beta distribution. Am I making some dumb mistake? fn <- function() { X <- rexp(n = 1, rate = 3) Y <- rexp(n = ...
Hello everyone and good day to you, Could you please explain how to use principal components in principal component analysis in a correlation analysis? I performed a PCA on my dataset and extracted 2 components form 8 variables; Now I'm wondering how to use pearson or spearman correlation analysis to find out the corre...
Countably additive probability is defined on sigma field. However a finite additive probability needs only a "finite-additive" field: the finite additive probability does not need the countable infinite union of events to still be in the field To be specific, sigma field requires that countable union of subset is also ...
In scikit-learn's LogisticRegression docs they write This class implements regularized logistic regression using the ‘liblinear’ library, ‘newton-cg’, ‘sag’, ‘saga’ and ‘lbfgs’ solvers Logistic regression doesn't have a closed form solution. So it must use some optimization algorithm like gradient descent or Adam. So...
Let's say I have three distributions, P1, P2, and P3, which are probability distributions with domains defined between 0 and 1. Generically these are not Gaussian (more like Beta distributions). I can sample from these three distributions, generating samples p1, p2, and p3, such that I impose the constraint that p1+p2+...
I did an extensive research on more than 50 papers in Finance and Economcis using Propensity Matching Scores. However, there is no paper so far tell me how to match the unit-by-unit(firm-by -firm) due to propensity score. Clearly, the steps of working on PSM are: Calculation propensity for each OBSERVATION based on pr...
I have 18 different groups that I need to compare. I used the raw values from a neuroimaging file to represent synchronization between two brain regions (which ranged from 0 to 1) and Fisher Z transformed them in the hope that I would be able to use parametric statistics (namely an ANOVA to compare the means of these g...
I have a questionnaire to check the implementation of several recommended health improving measurements. It will look approximately like this: Did you do your 20 minute Yoga routine on a daily basis? Answers possible: Yes / No / partly Did you increase your protein intake? Answers possible: Yes / No / partly Did you e...
I am estimating a model with exogenous variables using ARIMA, from the statsmodels package. But I can't interpret the results, the coefficients are very different from what I expected. Consider the following model: $$ y_t = 1 + 0.5 y_{t-1} + 4 z_t + \varepsilon_t $$ where $z_t$ is a dummy and exogenous variable. I've s...
I have data that look like this. And my goal is to reduce this 3D dimension into 2D dimension so it might looks like this. Turning the angle so the distance between all classes becomes maximum. So therefore I have made a MATLAB-code to use: function [W] = lda(varargin) % Check if there is any input if(isempty(var...
I have different series from banks balance sheets in monetary terms covering various years. I think is best to use a price deflator to control for inflation. I'm attaching two graphs the before and after of applying the deflactor to the data. For every data in the series I'm applying the following formula: row value fr...
I am currently learning about confidence intervals for the population mean. Assume we do not know the variance of the population. Let $\bar{x}$ be the sample mean, $s$ be the sample variance and $n$ the sample size. I learnt the following: Use $\bar{x}\pm t_{\alpha,n-1}\frac{s}{\sqrt{n}}$ if the data is normally distr...
I've seen a similar questions posted but I wasn't sure on the answers that were provided. Similar to when I try and look these methods up, I've seen more general abstract descriptions that were hard to understand. I think I've read that G-method is just a general term for a model that estimates ATE and so encompases th...
I am working with data collected in a community. We know the basic information about the community, let's say the racial composition is 60% black and 40% white, in a city of population = 500,000. I now have a list of incidents (fewer than 200 of them in total). Let's assume people involved in these incidents are either...
I am trying to calculate the variance of a truncated normal distribution, var(X | a < X < b), given the expected value and variance of the unbound variable X. I believe I found the corresponding formula on wikipedia (see picture below), but as a Psychologist I am not trained in mathematics and cannot read the formula. ...
Chapter 10, Problem 2 from The Analysis of Time Series by Chatfield and Xing: The problem says, "Consider the following special case of the linear growth model:" $$ X_t = \mu_t + n_t $$ $$ \mu_t = \mu_{t-1} + \beta_{t-1} $$ $$ \beta_t = \beta_{t-1} + w_t $$ where $n_t$ and $w_t$ are independent normal with zero means a...
I've built a Logistic Regression model in Python for the likelihood of an individual doing an action in the next n days. I am not very experienced at this! My data comprises one row per individual. I have >500k individuals. I have five individual-level features, and a sixth time-based feature: median gap between action...
Can anyone point me in the right direction for doing sample size/power calculations for hierarchical log-linear analysis of nominal (frequencies) data? Would I get in trouble with reviewers for just using the old rule-of-thumb to get 100 cases per cell?
I have daily sales (total volume in dollars) from 200 stores of the same franchise, over two years. I would like to identify any store with anomalies or special patterns, which could be the sign of a fraud or just a different management (good or bad). My problem is that the stores are not of the same size, hence the da...
Consider the $\{N(\theta,1):\theta \in \Omega\}$ family of distributions where $\Omega=\{-1,0,1\}$. I am trying to show that this is not a complete family. That is, if $X\sim N(\theta,1)$, I need to find a non-zero function $g$ for which $E_{\theta}[g(X)]=0$ for every $\theta \in \mathbb \Omega$. Now, $$E_{\theta}[g(X...
Is the following statement correct? The Central Limit Theorem (CLT) states that as the sample size tends to infinity, the standardized sample mean distribution approaches the standard normal distribution. Motivated by this theorem, we can say that for a large sample size (greater than 30), the standardized sample mean ...
I know that the covariance of two random variables, such as X and Y, is calculated as follows: $$ Cov(X, Y) = \frac{\sum{(X - \bar{X})(Y-\bar{Y})}}{n} $$ where $n$ is the size of the sample and $\bar{X}$ and $\bar{Y}$ are the means of X and Y, respectively. What I do not understand is how this formula measures the dep...
I have a few questions concerning what to do next after balancing your population with IPTW. This is a code just to have an example: library(WeightIt) W.out <- weightit(treat ~ age + educ + race + married + nodegree + re74 + re75, data = lalonde, estimand = "ATT", method = "ps") Outcome = re78 Fi...
I want to make sure I am choosing the right statistical test. I am working with 7 semesters of exams scores for a particular course. Each semester the course ran with many sections. However, the students, no matter what section they were in, no matter which teacher, were given the same exams. Let A = exam 1 and 2 avera...
I need to analyse the results of a messaging trial where the value of interest the the click through rate (CTR) on social media ads. I tested 8 ads and a control and I have the CTR for each one (e.g. message one had a CTR of 1%, message two had a CTR of 2%). The issue is I don't know if just using an ANOVA will be ok b...
I am trying to analyze some preliminary data for a conference. I currently have two animal participants completing a series of tasks. The tasks use different types of feedback (4 levels), which vary in the order they are completed (4 levels) that they occur. One animal has completed 20 tasks and the other has only comp...
We know that it's better to standardization the training data (i.e. X_train) before fitting a LASSO model, especially when features are not in the same scale (Ref. Is standardisation before Lasso really necessary?). But after fitting a LASSO model, when doing the prediction with the new data, do we still need to rescal...
I fitted my data in a GLMM model ("poisson" family) in R, and I got a z values of z value = 2.278. But after I put the model into post-hoc analysis ("Dunn" adjustment) with "emmeans", the z value became z value = -3.350. Why would the z value change? Thanks!
Suppose that for $i=1,2, \ldots, N$ and $j=1, \ldots, n$, the r.v.'s $Y_{i j} \sim \mathcal{N}\left(\vartheta_i, \sigma^2\right)$ are mutually independent, where the parameters $\{\vartheta_i\}_{i=1}^N$ and $\sigma^2$ are unknown. Problem 1: If $n=2$ and $N$ gets large, show that the MLE $\hat{\sigma}^2$ converges in p...
I have an imbalanced fraud dataset with ~$1.4$% fraudulent samples across 50,000 rows with 600 columns. I'm performing a binary classification task on this dataset. I've performed an EDA; some columns are $99$% the same value. The $1$% of entries that are not the same have a lower fraud rate of ~$1$%. I believe that ma...
I run competitive events. In our normal event, we have 8 adjudicators split between to categories. Skill and Artistry. For each category we throw out the high and low scores and average the remaining two scores for the final result. This helps eliminate bias. I'm trying to find a similar method when there are only 6 ju...
Does any of the YOLO models use NMS during training? From going through the papers they only explicitly state that NMS is only applied during inference, unlike Faster-RCNN. Does any YOLO (or other computer vision) algorithms filter out low confidence boxes during training based on some threshold before computing the ...
I have some categories in a fraud dataset I'm working on that are composed of 99% one category and 1% the other. On inspection these categories contain the exact same percentage of frauds ~1.4%, which is inline with my dataset's average. If the categories present nearly the same information in terms of the target, are ...
Scikit learn allows us to fit Gaussian processes $GP(0,K(.,.))$ such that $K:T\times T \to \mathbb{R}$ is a covariance function (kernel), however it doesn't let us specify a mean function $m: T\times \mathbb{R}$. I'm trying to work solely with scikit-learn, so working with only the tools it provides. Is it a reasonable...
I am currently working on my thesis and I have run into some issues regarding interpretation of my analysis. I wanted to find out whether relationship between my IV and DV differs based on gender (two categories - male and female). In statistics classes I have been advised to do quick t-test before running the regressi...
I am new to power analysis in multi-level models. I am looking for a possibility to do a power analysis for the following 2-level model: Y = y00 + y10D1 + y20D2+y01Z +y11D1Z+y21*D2Z. In this model, I investigate the effect of time (D1 and D2) and an experimental condition as well as their interaction effect on my outco...
Consider independent observations ${(y_i, x_{1i}, x_{2i}) : 1 ≤ i ≤ n}$ from the regression model $y_i = β_1x_{1i} + β_2x_{2i} + e_i, i = 1, . . . , n$ ,where $x_{1i}$ and $x_{2i}$ are scalar covariates, $β_1$ and $β_2$ are unknown scalar coefficients, and $e_i$ are uncorrelated errors with mean $0$ and variance $\sig...
How to compute the conditional variance of a sum of three normally distributed random variables given two other random variables? Assume pairwise correlations exist and the following joint distributions: $X\sim \mathcal N(\mu_X,\sigma_X^2)$; $Y\sim \mathcal N(\mu_Y,\sigma_Y^2)$; $Z\sim \mathcal N(\mu_Z,\sigma_Z^2)$; $\...
I'd like to estimate an integral of the following form using Monte Carlo method: $$ \int_{t_1}^{t_2} g(t) \left[ \int_{- \infty}^{\infty} f(t, u) du \right] ^\gamma dt$$ In case of $\gamma$ being a positive integer (say, $2$) I can rewrite it as follows: $$ \int_{t_1}^{t_2} \int_{- \infty}^{\infty} \int_{- \infty}^{\in...
I am learning gam by myself. I tried to find posts that can help me to finding and understanding smooth functions i.e., basis functions from gam using mgcv. From a post I found I can use smoothCon to estimate basis functions without explicitly from the model. However when I did so, I observed smoothCon and mgcv$smooth ...
If we have a recorded percentage (statistic) on a population, if we take random samples we might not encounter the percentage till e.g. even we exhaust the population. E.g. a box with $500000$ balls of which $25000$ ($5$%) of them are red and the rest are all white. My question is what is min/max number of a sample to ...
I have made several models (RF, XGB and GLM) to predict a binary outcome and they all achieved an AUC of approximately 0.8 and Brier scores 0.1-0.15. Test set is fairly small (n= 350), cases with outcome are (n=50). I am trying to create calibration plots in RStudio and I am getting results that I don't understand. At ...
I am reading this blog post where the author talks about diffusion models. Let's keep diffusion out of the conversation for now. The author showcased that we can parameterize a Gaussian distribution by a desired standard deviation sigma as shown below: I didn't get how the sigma value is inserted here. Can someone pl...
I'm currently researching an moderation model in SPSS with Gender as Moderator. When I'm running PROCESS number 1 (moderation) I choose the option “only continuous variables that define products”. Result: interaction effect not significant & main-effect not significant. When running the model with "All variables that d...
When we have response variable that is of binary type and our interest is to know how probability is associated with covariates then we use logistic regression. But I specifically want to know about logistic generalized additive models (gam). Suppose, I have a data with binary response. How can I know whether here I ne...
For a data matrix $X$ of dimension $n \times p$ where $p > n$ and corresponding label vector $y$ of dimension $n$, the standard least squares fit, $\hat{\beta} = (X^TX)^{-1}X^Ty$, is underdetermined. A typical approach is to use the Moore-Penrose inverse to find the min-norm solution by solving $\hat{\beta}^{\text{mn}}...
As far as I know [source], $$t_{\widehat{\beta}} = \frac{\widehat{\beta}}{\widehat{SE_{\beta}}}.$$ It means the sign of the t-value should be the same as the sign of beta. In Table S1 of Shen (2018), the signs are different. Why? Did I miss something? I have noticed the passage referenced by user @utobi before. But (1)...
Description of background Consider a 2d random walk with drift: $$X(t) = \sum_{k=1}^t X_k \\ Y(t) = \sum_{k=1}^t Y_k$$ where each $X_k$ and $Y_k$ are independently exponentially distributed with rate $\lambda = 0.5$. Let's define $Y^\star$ as $Y(t^\star)$, where $t^\star$ is the time when $X(t)$ passes some boundary ...