instruction
stringlengths
9
38.7k
Suppose I have a structural equation $$y=\beta D+\alpha X+\epsilon,\;\epsilon\sim N(0,1)$$ and a first-stage equation $$D=\gamma Z+\eta X+\xi,\;\xi\sim N(0,1)$$ where $D$ is a continuous endogenous variable, and $X$ is exogenous, $Z$ is an instrumental variable that takes a binary value 0 or 1. I want to simulate this ...
I need some clarity on the following statement: "Statistically significant result, then there was - by definition - sufficient statistical power." Is this right? if so how?
I'm building a classification model to predict some target variable. I have only one continuous feature (age) that I am interested in scaling. I split my data into train and test sets, I scale this feature separately in both the train and test (using the scale() function in R), and only then do I train the model, using...
I am interested in knowing if the same phenotypic structure holds across six different datasets. First, I have done six different multivariate analyses for my six different datasets (using MCMCglmm). For each resulting multivariate analysis, I obtained the correlation matrices (as I have repeated measures for different...
I am keen to learn more about panel data models using python, but I do not find related courses or many resources online. In particular, I usually find general statistics courses with Python or, courses that are specific for panel data regression but in R. Any chance anyone has suggestions/places where I could look at?...
What is the intuition, whether geometric or otherwise, to scale 1D scalar data to 0 mean and unit variance? The zero mean seems straightforward, particularly for ML algorithms, but what is the significance of unit variance? Why not scale by just the max in the data so that the data is bounded to [0,1]?
I have a question regarding how to use ANOVA appropriately in my paper. The following is my sample data. The mice are randomly selected. The first row is the control group as health mice. There are four treatments applied to the mice. In my writing, I can run the ANOVA function to generate results, but I am unsure how...
I've seen some questions on inter-rater reliability here for categorical variables. I'm wondering what would be an adequate approach to test inter-rater reliability between two raters for a numeric variable ? Suppose, for example, that I have two teachers assessing students on a test and I need to check the teachers (...
I am currently trying to look at how the likelihood of reaching a particular insect life-stage (in this example 1st instar) is influenced by both temperature (factor: 6 levels - 20, 23, 26, 29, 32, 35 degrees Celsius) and species (factor: 2 levels - HA and AP). Here is an example of what my data looks like Temperature ...
I would like to calculate what effect size a given sample size, in a multiple logistic regression, is sensitive to detect. Do you have any advice? Is there a way in R?
I'm working through the math of ridge regression and am having some trouble replicating some R functions. My question is NOT about R, per se, I will just use it here for a reproducible example but really am trying to learn how to build an implementation. I'm assuming the R code implementations are correct and that mine...
I'm trying to tune hyperparameters for XGBoost using RandomizedSearchCV. I have five outputs and I guess that might be the reason that I can't run RandomizedSearchCV or GridSearchCV to tune hyperparameters. Running this code: params = { 'max_depth': [3, 5, 6, 10, 15, 20], 'learning_rate': [0.01, 0.1, 0.2, 0....
I am applying various regression algorithms, such as RandomForestRegressor, AdaBoostRegressor, KNeighborsRegressor ...etc. I fit these models on training data (only 1 feature for simplicity), and intentionally leaking the training data to observe the prediction accuracy. In other words, I am using the training data as ...
I'm very rusty on statistics, so go easy on me haha. I'm trying to compare two sample sets of values to see if there is any significance difference between the two means. From memory, an unpaired t-test should be able to do this? The issue is that one set has zero variance, so do I use an equal variance test or an uneq...
I have a longitudinal dataset with several binary variables, along with an id variable and a time variable. In my research project, these binary measures are observed behaviors during a videotaped task (0 = absent, 1 = present) and I am interested to examine how the behaviors correlate over time and which (if any) vari...
In Section 6.3.1 of the paper "No Subclass Left Behind: Fine-Grained Robustness in Coarse-Grained Classification Problems", it is mentioned that the algorithm proposed by the paper has better-than-random precision. What does better-than-random precision actually mean? Could you please help me understand this concept wi...
Formula log(sale) = price+ads_rating_tv+ads_rating_banner+Jan+Feb+Mar+May+Jun+Jul+Aug+Sep+Oct+Nov+Dec+time+North+South+West+East+time Variable sales = unit sales price = price of product ads_rating_tv= rating from ads on tv ads_rating_banner= rating from ads on banner month (categorical) = Jan, Feb, Mar, Apr, May, Jun...
The setting is comparing two independent groups represented by random variables $X$, and $Y$. The common language effect size / probability of superiority / relative effect ... is defined as $p(X,Y)=P(X<Y)+0.5P(X=Y)$. I am wondering what happens if we assume that $X$ and $Y$ are generated from latent variables such tha...
I am trying to show the last equality with steps: Where, Wi is the treatment status and the treated sample is Nt, while the control sample is Nc. I cannot find my through it. Anyone has an idea?
I would like to calculate the values of the concentration ($\kappa$) and mean direction ($\mu$) for a von Mises mixture model from the theta values given by the movMF() function in R. At the bottom of this message-chain there is a similar question with an example for a two component vonMises. The solutions seems to be ...
Assume that we only consider $$G(x)=\exp(-\exp(\frac{x-\mu}{\sigma}))$$ is the Gumbel distribution. Question: Suppose we have a set of maximum values $\{Y_i\}_{i=1}^m$, why can the article directly (for example: here) use this set of maximum values to fit the Gumbel distribution based on the maximal likelihood method ?...
I have created a ratio dataset - representing the number of rejections/total number of applications. There are some instances in which none of the applications will have been rejected, resulting in a 0 ratio score. However, there are also some instances in which there were no applications, resulting in NAs. I am undert...
Suppose we run an AB test wherein users in the treatment are shown some content and users in control are not shown the content. For all intents and purposes, it could be a button. Clicking on the content is optional. After the experiment is done, we can compare treatment and control groups on some binary outcome. The...
It is well known that many sigmoid functions are approximately linear around x=0. I am looking for a sigmoid function that has a parameter that controls the length of this segment. I want to measure the length of this segment by its projection onto the y axis. Edit: The sigmoid function should map to the interval [-1, ...
I'm struggling with some basic concepts regarding the definitions of random variables. If I'm not mistaken, random variables are functions which aim to "translate" outcomes of a sample space to a measurable space. As an example, the sample space composing the possible outcomes of a coin toss would be "head" or "tails"....
I'm an undergrad student working on a small research project while studying abroad and I was looking for a statistical test that I could use to compare species richness between three forest types. I collected data on the species richness of moss (i.e. number of unique moss species) for 4 replicates of three forest type...
Working through digit recognition on the MNIST data set, one of the example problems reduces the dimensionality of the feature set, which is 768 samples, down to 18 using PCA. For illustration purposes, we project the input examples onto the principal components. What exactly does this projection mean, how should it b...
I was looking through the answers to this question, and all of them seem to have some form of symmetry between the variables. I'll walk through the examples in that question so you can see what I mean. Coin Game Example $Y = \pm X$ and $X = |Y|$ (symmetrical functions) The $x^2$ and $x$ Example Both the uniform distrib...
I am taking a course in Statistics and our prof showed us a real survey that was recently in the news. In a country with a population of roughly 30-40 million people, only 1000 people were asked about their opinion on a controversial political question (e.g. should more money be invested in healthcare?). The results in...
out of curiosity, I wonder if there is a solution for the expectation of the product of two chi-square variables (or the variance of the product of the normals). Say: Let $(X,Y)$ be jointly normal, with mean 0 and covariance matrix $\Sigma = \begin{pmatrix} \sigma_{1}^{2} & \sigma_{12}\\ \sigma_{12} & \sigma_{2}^{2} \e...
The question is exactly on the title. I am building a VAR model for a specific commodity. The AIC and BIC suggested 1 lag. However, that coefficient in lag 1 is not significant in my model. Can I still forecast using this model or is it justified to add lags? If I add lags, how much lag needs to be significant until th...
I would like to determine potential drift in the data/device. Is there a general acknowledged procedure and/or method to do so? I know how to visually "detect" a drift but I would like to know how to describe it mathematically. And also how to prove it statistically. Btw, is there a difference between drift and trend? ...
I have a simple question that would help me a lot in interpreting my results I ran a glmer model in R with the following variables: a binary DV that is dummy coded a categorical IV1 named "condition" with three levels. Contrast coded as (-.66, .33, .33) then as (0, .50, -.50) a categorical IV2 named "prime_type" wi...
Suppose we have we the structural equation where Y is continuous and T discrete. An example could be $Y$ is wages and $T$ is years of schooling $$ Y = \alpha + \beta T + u$$ We have a binary excluded instrument $Z$ that monotonically increases $T$ with non-zero first stage at each value of $T$ $$ Z = \gamma + \eta Z + ...
In linear models, we do statistical tests (e.g. normality of residuals, homoskedasticity, autocorrelation, etc.). In spline regression, using the following method, we are running linear regression only. But they are not a single regression equation, but more than 1 equation. library(splines) x <- runif(100) y <- si...
I'm estimated the effect of discrepancy of working hours on satisfaction of life, so I modeled an ordered logit regression using MASS:polr for my thesis. I created output tables for summary, brant, vif tolerance and also created effect plots using the effect package and correlation plots. Do you have any other suggesti...
I am getting confused .How can a Poisson be a special case of exponential distribution?
My friends and I are thinking about participating in an event to collect these cards. There are 8 total cards in the set, and we can buy a pack of 10 random cards at a discount. So we were wondering, what is the % chance that we get all 8 of the unique cards in our 10 card pack (assuming each card has an equal chance)?...
I just wanted to know, can we have different results for the same inputs, using Chi 2 and KS? So for example I suppose that my variable flows a uniform law, as I do the test, the results I have are: the hypothesis is rejected (using Chi2) and accepted (using KS) KS means Kolmogorov-Smirnov
I know it is wrong but I am not sure why. We run a linear regression $$ Y = a + bX + e$$ we get the residual $$ \hat{e} = Y -(\hat{a}+ \hat{b} X)$$ Why can we not check $cov(X,e)=0$ using $corr(X,\hat{e})$? Is it because $\hat{e}$ is also biased?
I would like some opinions on my current situation. I have a set of time series data that I want to forecast. The data however is not very long (around 500 rows) so I was looking into generating many synthetic datasets that mimic my current one's statistical characteristics. I have seen online, methods that can generat...
Say we have a number of different geographic areas, $A_1, A_2, ...$, and a quantity $X$ that follows a gamma distribution in each area but, we expect, with different parameters: $(k_1,\theta_1), (k_2,\theta_2),...$. If we take a sample from the full population across all areas (call this the 'top-level' sample), we can...
I have run a mixed effect model using GraphPad Prism 9 software on mouse blood pressure data. I have 8 subjects (3 in one genotype group, 5 in the other), and I have blood pressure data across time for most of these subjects (hence the mixed model, not 2-way ANOVA). I would like to know whether the blood pressure of th...
I am looking for suggestions towards a clustering method for rhythmic/oscillation data. We performed cosinor regression (sin(2*pi*time/period)+cos(2*pi*time/period)) over a 24h period (the context here is gene expression data, data acquired at 6 timepoints) and then calculated acrophases (so the timepoint of peak expre...
I am using statsmodels.tsa.holtwinters.ExponentialSmoothing to perform Holt Winters' Additive method, first on training dataset and later on the whole dataset. After training and testing, I take the parameters of the exponential smoothing instance and assign it to the model that will be fit on the entire data, but then...
The data I am provided with is monthly CPI. I have plotted a logarithm of this variable and then made a difference to obtain inflation. As I plot the graph for inflation I can see that it is stationary: After this I have plotted the ACF and the PACF functions with 6 lags, as I am indicated by the question of the exerc...
I have two timeseries one for a three-day accumulated rainfall and another one for a daily storm surge height. I would like to calculate the probability of a certain rainfall depth with a certain storm surge height. For instance, the probability of 8 inches of rain falling on the same day where there is a storm surge h...
I am conducting a study with a large population-based sample. We have measurements at two time-points spaced 8 years apart. I want to see if a variable at time 1 predicts changes in the DV over time. I have a set of covariates (both time-invariant and varying, e.g., race, age, gender). For our second aim, I am also loo...
We have the posterior distribution $\lambda |\underline{x}\sim \Gamma(2106/121,1217/121)$. From here it is clear that (using R) the posterior median value is approximately $m=1.697$. Now, we are given the transformation $\theta = 1-e^{-\lambda}$ and are asked to find its median. My method is as follows: $\begin{align*}...
Lets say i have a Timeseries of data for different goods in a basked. Af first, i do not want to calculate an index value to answer the question "How much more expensive is the basked compared to a reference period". The reason is that the prices in this basked are on vastly different scales. Instead i first want to ca...
As I understand, there are two sources of variations when growing the decisions trees of a random forest: one from the bootstrapping and another from the random selection of the variables available in your dataset that will be used to construct each tree (is this called feature section, by the way?) Let's say I have fo...
I am trying to evaluate how well a disease test performs in a case-control study. In this example, the prevalence is 0.5%, and the results are below: Disease + Disease - Test + 40 (TP) 10 (FP) Test - 600 (FN) 5000 (TN) As the sample is enriched for those with the disease, the standard PPV calculation $PP...
I recently read about the PAAS as an alternative to Bonferroni. Unlike Bonferroni, where $\alpha$ is subdivided among multiple tests such that $$ \alpha_1 + \alpha_2 + \ldots + \alpha_k = \alpha $$ where $\alpha$ is the overall alpha. It is shown that Bonferroni controls the FWER (Family-wise Error Rate). I understood ...
I am trying to understand the Bayesian method. From Wasserman, my understanding is that the process for parametric inference is roughly: Choose a statistical model $\mathcal{F} = \{F_\Theta\}$. Construct prior distribution $f(\theta)$ for $\Theta$ giving our beleif for how likely $\Theta$ is to take certain values. Ob...
I want to model a random variable that takes values between 0 and 1, and where 0 and 1 are included. Zero and one are possible values of the random variable and occur frequently. I have several covariates available I think I have (at least) two options: (a) Use an ordered logit for which part of the interval we are in:...
Suppose I have a column with a limited number of discrete values that belong to the range between 1 and 10, e.g. 5 5 3 6 5 2 4 4 5 2 6 I would like to sort those values in a way where I give priority to the chronological order new values appear (e.g. starting with a 5, then 3, then, 6 etc) but grouping similar element...
I am building a zero-inflated NB model, and I know my data are spatially autocorrelated (as per the acf test). My current model is: ZINB_NAFO <- zeroinfl(num_incidents_NAFO ~ log(vessel_hours_NAFO) + num_whales_NAFO + offset(log(area_NAFO)) + factor(Season), dist = 'negbin', data = df_NAFO_Seasons) Is there a term I ...
As an example, I have two class (say A and B). I would like to determine if age, gender, location etc. is associated with class B. My initial thought is to perform a multivariable analysis using logistic regression. The problem is that samples could belong to both class. For example, a patient (sample) could belong in...
I am working in astronomy. I fit a theoretical model to some data. The model takes input parameters (like the mass and age) and produces some outputs that I compare with the data. I measured the goodness of fit of the model $$\chi^2 = \frac{1}{N-P}\sum_i^N \left( \frac{\mu_i - y_i}{\sigma_i} \right)^2$$ where $N$ is th...
Here is the linear mixed model that I am working with: p3 <- lmer(respTime ~ proc*farFC+(1 | Subject), dtINT) Proc refers to a factor with 2 levels (adjacent and overlay) farFC refers to a continous variable with 9 levels The main output is below. The slope of overlay is = 0.958. When I change the reference level fro...
I would be surprised if we actually had a date here. I am curious who, if anyone, created the ecdf plot. When did the ecdf make its first appearance? If we do not know when the first ecdf plot was made do we at least have a general time period of when the started to show up?
I would like to report the slope coefficient of several meta-regressions with one predictor. I am wondering what the correct term for this coefficient is. Is it simply b1 or is it β?
Good evening, I ran a Fisher's 3X2 Table for a Variable Happiness (Measured High, Medium and Low) and another variable measured Yes/No. This yielded statistical significance. I was wondering if there was a post-hoc test which could be performed. I had two thoughts: Running 3 Fisher's 2x2 Tests with High-Medium, Medium...
I am trying to complete a multiple linear regression to best explain my response variable using 3 independent variables x1, x2 and x3. I have used ggplot() to create 3 scatter plots for x1, x2 and x3 in conjunction with y: And when I use the lm function in R to account for interactions: My instinct is to discard x3...
I have a variable $y_{i,t}$ that takes values from $[0,\infty)$ for individual $i$ and for $t=1,2$. I construct a variable $\Delta y_{i} = y_{i,2} - y_{i,1}$. For most of my sample (73%), $y_{i,1} = 1$. Hence mechanically, for individuals with $y_{i,1} = 1$, their $\Delta y_{i}$ is bounded below by -1. Suppose I'm inte...
Given a simple grid world problem, if asked to compare and analyze several algorithms, it makes sense to run multiple trials due to stochasticity. Does it also make sense to vary the state of the MDP in question, or does that make it a different MDP? This is a question about definitions. If I change the size of the g...
relative importance analysis there is an package called "flipRegression" from github.com which can perform relative analysis/ relative weights to analyze the importance of each brand attribute in relation to the others. I cannot download this package from github, is there any other way to do this analysis?
I am looking at the proportion of fishing trips made using a particular gear (LE_MSZ2) in two management phases (FT_PHASE) to look for change. Each observation is a number of fishing trips made using a gear in a phase. I have fitted a binomial glmer to the data, however the predicted proportions of gear used are the pr...
This is my first repeated measures analysis. Subjects in two groups exercise until "peak" level. Blood is taken at baseline (prior to exercise), peak, 2hrs post, 24 hrs post, and 72hrs post. Levels of various proteins are measured in the blood samples. Groups: 2 (mutation for disease, control) Subjects: N Time Points (...
I'm trying to fit a dataset to a periodic model of data (simplified as $F = A\sin(x/T)+B\cos(x/T),$ where $A,~ B,$ and $T$ are the model parameters) using python. I've been encouraged to use linear regression to do so - something I'm finding challenging, as the parameters don't seem to be exclusively linear, and I can'...
I'm currently calculating an intraclass correlation coefficient for my data. As far as I'm concerned, the best choice (following this approach and the approach kindly recommended on the previous post answer) is: Model: 2-way random effects ## two teachers' assessment of the same group of students on an exam (it could ...
I am studying forecasting based on Lewandowski algorithm. I have an article that introduces about Lewandowski algorithm, but I do not understand how to apply in practical, especially model it in Excel file. Explanation on this would be appreciated.
In conditional logit models, global intercepts cannot be estimated as they do not influence the conditional probability of a positive outcome within groups. I understand the intercept term gets canceled out in the derivation of the equation, just as any coefficients for which predictor values are constant within groups...
Let $(X_t)_{t\geq0}$ be a strictly stationary process. By definition, the one-dimensional marginal distribution is the same along the time: $$X_t \sim D, \quad \forall t \geq 0.$$ Now, consider the following strictly stationary autoregressive process $$X_t = 0.9 X_{t-1} + \eta_t, \quad \eta_t \stackrel{i.i.d.}{\sim} N(...
Given $\hat{Y}$ and $Y$, is there a way to compute the covariance matrix using R? For OLS regression, $Cov(\hat{Y}, Y) = \sigma^2 H$, where $H = X(X^TX)^{-1}X^T$. But when I do cov(Y_hat, Y) It only returns a single value. I'm wondering if there's a function in R that can compute the matrix (without directly calculati...
I have the task of classifying medical images in a binary fashion. I plan on using transfer learning on a CNN but don't know what source model would be best to fine tune for this task. Are certain source models better suited for particular tasks? If so, how would I go about determining which source model would be best ...
Suppose I only have the following summary data: "City A" has an adult population of "n1" : a representative sample of 25% of this adult population was asked for their income, and the average income was "x dollars" "City B" has an adult population of "n2" : a representative sample of 25% of this adult population was a...
I want to perform Bayesian optimization for a certain physical task but with additional requirements. We have access to a set of variables and want to maximize (multiple) signal outputs from an instrument. Our inputs to be optimized can be assumed to be in tidy format. However, for certain features (generally in pairs ...
I am looking for a function (preferably SAS) that can read daily/weekly/monthly data from over a few years and select the two best dates to separate the year into two seasons (not necessarily of equal length), each with its own trend.
I'm working on a diff-in-diffs analysis to look at the effect of a treatment on performance on standardized test. The treatment affected Hispanic but not white students, so I'm using white students as a control. Specifically, I want to study the raw scores obtained on the test and the passing rate. To give an example o...
So I'm watching this video tutorial from CVPR this year on diffusion models, and I am confused by the variance term in the distribution on the left on the video. I understand that in the forward process, we can track intermediate distributions $$q(\mathbf{x}_t|\mathbf{x}_{t-1}) = N(\mathbf{x}_t;\sqrt{1-\beta_t}\mathbf{...
I am trying to make a model in Python to predict the influence of different parameters on the total amount of leakage trough an orifice. I tested the following parameters: Pressure level (6 levels) Orifice size (3 levels) Orifice shape (categorical variable, round or not round) Fluid viscosity (categorical, water or b...
Should we include the constant when we estimate propensity scores? We model the probability that $D_i=1$ using a set of controls $x$ $$ p (D_i=1 | X=x) = \alpha + x \beta + \varepsilon $$ to created predicted values $\hat{p}$. Should we include the $\alpha$?
Based off of several posts I have read on this site, I wanted to confirm that the following understanding is correct: Suppose I have a device that translates a physical process of interest into an analog voltage signal that is then converted into / acquired as a digitized signal; the analog voltage signal is sampled at...
I'm building a classifier using GBM algorithm, in R. The target data is binary of type chr. Here is the data summary: > glimpse(data) Rows: 1,523 Columns: 15 $ PD <chr> "Progressive", "nonProgressive", "nonProgressive", "Progressive", "Pr… $ gender ...
Consider the Bernouilli experiment of tossing a coin $2$ consecutive times, with the probability of getting "heads" of $p=0,8$ The base space can be described as follows $\Omega=\{HH,TT,HT,TH\}$ And the two random variables $X_1$ and $X_2$ can be assigned the following values: $$ X_1(HH) = 0 $$$$X_1(HT) = 0 $$ $$X_1(...
In many applications, I have seen the combination of Kernels and Support Vector Machines. Why not combine Kernels with Linear or Logistic Regression instead? Is there any explicit reason to combine Kernels and SVM?
I applied logistic regression to check the relationship between a binary variable that is called FG and few independent variables the reference group for the variable SSE is SSE1. The OR is 0.48 meaning that the chances for those in SSE2 (from the same age group and the same physiological status) decrease by 52% to be ...
I am currently studying the textbook In all Likelihood by Yudi Pawitan. The section Inverse probability: the Bayesians of chapter 1.4 The emergence of statistics says the following: The simplest form of the Bayes theorem for two events $A$ and $B$ is $$P(A \mid B) = \dfrac{P(AB)}{P(B)} = \dfrac{P(B \mid A)P(A)}{P(B \m...
I want to perform an analysis on panel data I got from an online database. I encounter some problems however. One of them is that the database has a lot of features (110). And the other is that it also contains a lot of missing values. For some of the features the dataset even has more missing values than present value...
I am creating a classification model to predict the credit score of a person based on lots of factors. I got the dataset from kaggle. When I started doing the EDA part, I noticed that the skewness values of the numerical variables are too high such as 11, 20, etc. So is it ideal that I should drop those variables or is...
It appears glmrob from the robustbase library does not support quasipoisson or negative binomial for the moment for the robust fitting of overdispersed Poisson counts. The same is true for robust::glmRob. Is anyone aware of good options in R to fit GLMs or GAMs to overdispersed Poisson counts using a robust method? May...
I have collected data from 300+ studies on microplastic densities in rivers, I would like to investigate how they vary with numeric variables (population density, Average GDP, plastic production) and character variables (vegetated/non-vegetated, continent, ecoregion, climatic zone). However, when running "metamean", an...
I have mathematically rewritten my problem as a function of multiple iid variables: $$ f(X_1, X_2, ..., X_n), $$ where $$X_i \in \mathcal{N}(0,1)$$ I now want to determine the empirical distribution function $$F_n$$ of this function by sampling from the distribution of $$(X_1, ..., X_n)$$ How would I go about this? Can...
Assume I have train dataset below, I avoided using model.matrix() and instead I used dummyVars() because I want dummy variables to represent all levels of my categorical variable. Now I am confused where to enter bs() function for numerical variables. I want all numerical variables to enter the lasso model like bs(tra...
Consider the following three independent random variables, $X_1 \sim N(\mu_1,\sigma^2_1)$, $X_2 \sim N(\mu_2,\sigma^2_2)$, and $X_3 \sim N(\mu_3,\sigma^2_3)$. Now let me define the pairwise differences as $\delta_{12} = X_1-X_2$, $\delta_{13} = X_1-X_3$, and $\delta_{23} = X_2-X_3$. I know that these pairwise differenc...
Using a control function approach allows to incorporate non-linear first-stage specifications. A problem when doing this approach is that the naive standard errors are too small since they do not account for the fact that we use generated regressors. One solution, as for example suggested here is to bootstrap the stand...
I would really appreciate it if anyone can guide me through this. I have a $n \times (p+1)$ matrix $X$. The projection matrix $P = X(X'X)^{-1}X'$. I want to prove that $P(i,i)$ is in $[0,1]$, where $P(i,i)$ is a leverage point. How can I prove it using the idempotent property of the projection matrix. I have no idea wh...
I want to build an n-ary decision tree with categorical features. I am using ordinary ID3 algorithm to build a tree. Lets take the next dataset as a training dataset for building a decision tree: dors age cost 1 4 0 2 4 1 3 5 0 3 6 1 A decision tree will look as such: Lets say now in test or prod tim...
I have collected campaign finance data about donations individuals have made to 3 groups (A, B, C) between 2015 and 2020. Each donor has only donated to one group but some donors have donated multiple years. I am trying to compare the aggregate donation size across the 3 groups between 2015-2020. I plan to use Kruskal...