instruction
stringlengths
9
38.7k
Consider the following model: $wage_i=\beta_0+\beta_1after_i+\beta_2female_i+\beta_3after_ifemale_i+u_i$ where $after_i=1$ if date after gender-wage discrimination policy; $0$ if date before gender-wage discrimination policy. $female_i=1$ if female; $0$ if male. The 'treatment group' is females. This model measures...
According to my book, for a random sample $(X_1, \ldots, X_n)$ from a continuous distribution with p.d.f. $f(x)$ and c.d.f. $F(x)$, the p.d.f. of the maximum of the sample is $g(z)=nf(z)[F(z)]^{n-1}$, where $z=\mathrm{max}(x_1, \ldots,x_n)$. The book gives the following question: the random variable $X$ has p.d.f. $f...
I want to know if moose are crossing water more than expected. I followed the methods written in Beyer et al 2013 which I am now completely confused as to how to actually do the analysis. I am hoping someone would be willing to help explain the steps - because I think i am simply overly complicating it or I am missin...
I am trying to build a model of 7 classes text documents. However, i do not have equal number of samples for each class. I can have close to about 10k documents for class A but only about 100 samples for class E. How is it possible that I can improve my model. I am achieving about 80% accuracy currently.
What would be the proper way to evaluate/determine an NBA player's 3-point shooting consistency? For instance, I have a player that shoots 37% from 3-point range and takes 200 attempts all year. I was considering taking the rolling average 3-point% of an arbitrary number of shots (say 20). Then using those averages to ...
Two-period panel regression model: $Y_{it}=\beta_0\delta_{t2} + \beta_1X_{it} +\alpha_i + \epsilon_{it}$ where $t=1, 2$ $i=1,...,n$ indexes the cross sectional units drawn via random sampling. $\alpha_i$ is an individual-specific unobserved effect. $\delta_i=1$ if $t=2$; $0$ if $t=1$ In other words: $Y_{i1}=\bet...
The issue of unit roots and what $ I(1) $ variables do to a regression estimation is covered clearly online. However, it is of course possible to have order of integration greater than 1. What does it actually mean to say a time series is $ I(n) $ where $n>1$ ? What would a series like this look like? Are there any exa...
I was trying to understand the Covariance of two random variables better and understand how the first person that thought of it, arrived at the definition that is routinely used in statistics. I went to wikipedia to understand it better. From the article, it seems that good candidate measure or quantity for $Cov(X,Y)$...
I am new to the field of ANCOVAs. I want to check if two groups differ in three quantitative variables. At the same time I would like to control for gender and diagnose (6 categories). Is it possible, to run an ANCOVA with a categorial control variable? Furthermore: can I enter the three quantitative variables at once...
Let $X_1,X_2,...,X_n$ be i.i.d r.v's with common p.d.f. $$ \mbox f(x)=\frac{x^5e^{-x/\theta}}{5!\theta^6} $$ where $\theta$ > 0. Show that the Neyman-Pearson lemma produces a test of $H_0: \theta=\theta_0$ against $H_1: \theta=\theta_1 (\theta_1>\theta_0)$ with critical region of the form $\sum^n_{i=1}x_i≥c$ where $i=...
A problem has recently arisen for me which involves estimating relative strength of various mechanisms contributing to an overall quantity. These strength parameters $q_j$, $j\in[M]$ stays fixed between observations of the quantity $\kappa_i$, $i\in[N]$, but the weighting factors $p_{ij}$ change between observations. T...
I'm pretty new in R, and I couldn't find any information about a package who can do the following: supposing that I have a set of data (for instance, different text documents), which can have several classes. For example, a datum could be a Sport, a Sport with Ball, a Sport without Ball and a Car. I'd like to be able ...
My book gives the following lemma: if $X_1, X_2, \dots, X_n$ are independent normally distributed random variables, such that each $X_i$ has mean $\mu$ and variance $\sigma^2$, then the mean of $\bar{x}$ is normally distributed with mean $\mu$ and variance $\sigma^2$ over $n$. Following this, I attempted a problem w...
What would be the best option when you come across missing data. Do you exclude that person completely from the data analysis or not. If not then how do you go about it? i have data on two groups at three different time points. At each time point they had to undertake a 6 minute walking test. Now some participants they...
I'm trying to build a two class classifier on a dataset of around 570 samples. Im evaluating several classificiation stratigies (LDA, QDA,RDA, logistic, logistic with some additional ellements like splines ...) I have difficulties if I should take out a 25% of my 570 samples as a test set or if should just rely on 10 f...
I'm reading a paper where the aim is to optimize the following function: $h()$ is a loss function and $\lambda$ is a regularization parameter. The idea in $h()$ is that whenever $p_l-p_d > 0$ then $h()$ will give a penalty. Now the basic way to optimize this function is to compute the gradient of the function and the...
I have a cost function which I am minimizing which has no particular meaning beyond a smaller value indicating a more favorable set of parameters. Since I posted the original question it has occurred to me that I could probably write the cost function as a combination of probabilities- although I was hoping to keep the...
The gist of propensity score matching, as I understand it, is as follows: You want to estimate the average treatment effect (ATE) of a treatment on some outcome. However, if you simply calculate the difference between the average outcome of the treated and untreated groups, this may be a biased estimate of ATE if fact...
Having read through a few posts, I still couldn't find an answer to my question. I'm trying to investigate for the effect of covariate C on a longitudinal dataset. I have two linear mixed effect models given below: A.lme <- lme( A ~ B + C, data = data1, random = ~ 1 | id) B.lme <- lme( A ~ B*C, data = data1, random = ...
I must be missing something, or under-thinking what goes on with a basic T Test, but I was under the impression that if I do a T-test, and one of my samples was made up of only one observation, the test would fail. To see if this is indeed the case, I ran some code in Python code. I made up some numbers, where my firs...
The conditional expectation of the error in regression is: $E[Y-X\beta|X=x]$ is not equal to 0. Why is this the case? If you fix all the predictor variables, why does $E[Y]$ - $X\beta$ not equal to 0?
For teaching I need to explain the following diagram to undergraduate students. The diagram is taken from the 7th Edition of Howell's "Statistical Methods for Psychology". The students are familiar with how to calculate the Total SS, Between SS, and Within SS for a One-Way Independent groups design, and also for a One-...
I have been facing hard time understanding meaning of "random sample" as well as "iid random variable". I tried to find out the meaning from several sources, but just got more and more confused. I am posting here what I tried and got to know: Degroot's Probability & Statistics says: Random Samples / i.i.d. / Sample Si...
Most of the text classifiers are based on the bag-of-words approach where you loose the context that a particular word appears. As a solution (or simple solution?) we can use n-grams as features. But are there any classifiers which "gist" the idea and model it in someway before training?
I want to write some MATLAB code for the bandit problem, but I don't know what the exact algorithm is for this problem. Is the Epsilon-Greedy algorithm right? I have 5 slot-machines. For example, I should play a lever 1000 times as a task, and then if the mean of one machine's rewards are maximum in comparison with the...
I have two independent Poisson processes $A$ and $B$ with arrival rates $\lambda_A$ and $\lambda_B$, respectively. Now, the expected time for the arrival of the next item for the merged process should be $\frac {1}{\lambda_A+\lambda_B}$. Assuming $T_{A+B}$ to be the arrival time for the next item of the combined proces...
I am asking for a book reference to further my studies in machine learning with the R programming language. Feel free to reference multiple books that are just machine learning or just R programming. I understand some basic concepts, but I think I am having trouble applying my knowledge to get real results. For example...
I am trying to optimize my set of features against random forest cross-validation using MAPE criteria. I tried forward selection with Univariate linear regression test (f_regression in sklearn), I calculate MAPE for each set of variables selected by SelectKBest: for i in range(1,len(X.columns)): selektor = SelectK...
I have six variables measuring hotels' facilities by a group of managers. In the end, I want to compare mean scores for these six variables to determine which facility is actually favored in the hotel industry. Can I use a one-way repeated measures ANOVA to check if there are statistical differences between mean score...
Two towns, $X$ and $Y$. In each town: Pool cross-sections of male and female hourly wages, one from the year before a wage-discrimination policy took effect and one from the year after. Consider the following model: $wage_i=\beta_0+\beta_1after_i+\beta_2female_i+\beta_3X_i +\beta_4after_iX_i +\beta_5after_ifemale_i ...
I'm having some trouble positing a model in levels for the question below. Question: How does the percentage of students born in the United States at the school level moderate the effect of the use of applications or models while learning science (denoted as SCAPPLY) on PISA science scores (PISA - outcome variable)? L...
Find the form of the likelihood ratio test of $H_0 : \lambda = \lambda_0$ against $\lambda\neq\lambda_0$ when $X_1,X_2,...,X_n$ is a random sample from $Ex(\lambda)$. Simplify it as much as possible. I've started as follows, where $\lambda_1$ is some alternative parameter $$ \frac{L_0}{L_1}=\frac{\prod f(x;\lambda_0)...
I have observed values (80 in total) in different measured circumstances (80 in total). I want to test whether my observed values are the result of chance or do measured values affect my observed values. My problem is that measured values are non-normally distributed and observed values are normally distributed accord...
I have data showing outcomes of some treatment on different people grouped by sex and age (grouped into: infant, child, adult). I need to investigate if there is any difference in outcome among age groups or between sexes. I used: model <- aov(data$outcome ~ data$sex*data$age) summary(model) and found that neither sex...
$\newcommand{\X}{\mathbf{X}} \renewcommand{\S}{\mathbf{S}} \newcommand{\I}{\mathbf{I}} \newcommand{\1}{\mathbf{1}} $ I found an article with an unusual (for me) covariance matrix. Let $\X$ denote an $N\times T$ matrix of $T$ observations on a system of $N$ random variables representing $T$ returns on a universe of $N$...
In my research paper, I wish to compare the accuracy of 2 clustering algorithms. I have conducted clustering using these 2 algortihms on 300 proprietary datasets. I use adjusted rand index as the evaluation metric. Since, clustering has been conducted 300 times, I have 300 pairs of adjusted rand indexes to be compared ...
I am doing panel data analysis and some of my variables have high kurtosis. I am not sure whether I have to transform these variables. I have tried to delete outliers but one of the variables still not normal unless I delete many observations which then change the results to insignificant model note: this variables has...
I am in the process of writing an open source State Space Analysis suite in C# (for fun). I have implemented a number of different Kalman-Based Filters (Kalman Filter, Information Filter and the Square Root Filter) and the State and Disturbance Smoothers that work with these implementations. My tests on these filters (...
I was using one class SVM, implemented in scikit-learn, for my research work. But I have no good understanding of this. Can anyone please give a simple, good explanation of one class SVM?
I have a one group trial with n = 100. I want to analyze the relationship between the accumulated amount of drug intake (continuous) and the effect (measured by symptom score). For example, for different time points for patient 1: t1: d_amount 10, S_score 50 t2: d_amount 15, S_score 45 t3: d_amount 20, S_score 40 For ...
I understand the difference between LDA and QDA (linear and quadratic discriminant analysis), being that with LDA assume that your features have the same covariance matrix in each class. I wonder why I have not seen an example yet where they actually calculate the variance covariance matrices in each class and compare ...
I have a classification problem with 2 classes (positive and negative). Usually, in such classification problems, all the samples will be labelled either 'positive' or 'negative'. In my dataset, some of the samples possess a combination of both positive and negative characteristics. Formally, if the dataset is $x$, the...
Could someone help me with question 5.b. I understand that the probability of any of these occuring independently is 0.5 but how do I combine those into a joint distribution function? Is $0.5 \cdot 0.5 \cdot 0.5 \cdot 0.5 = 0.0625$ correct? Edit: Is it more like this? $S =$ Spam, $D =$ Dear, $F =$ Free, $H =$ Hot $$ P...
This is a question that arose from studying Hogg and Craig "Introduction to Mathematical Statistics",7th edition, pg 568. It is assumed that we have taken a random sample of $X_1,\ldots,X_{n1}$ and a random sample of $Y_1,\ldots, Y_{n_2}$, $n$ denotes the combined sample size, i.e. $n=n_1+n_2$ and sgn(.) is $1$ if the...
I read that 'Euclidean distance is not a good distance in high dimensions'. I guess this statement has something to do with the curse of dimensionality, but what exactly? Besides, what is 'high dimensions'? I have been applying hierarchical clustering using Euclidean distance with 100 features. Up to how many features ...
Suppose I have sets A and B of normally distributed data so that: A: mean=250, SD=200, N=25 B: mean=248, SD=200, N=20 Clearly, there is no statistically significant difference between the means (p=0.9736). But does this mean that the means are equal or that we have no evidence to suggest otherwise? Considering the ...
I've read through the many excellent discussions on the site regarding interpretation of confidence intervals and prediction intervals, but one concept is still a bit puzzling: Consider the OLS framework and we've obtained the fitted model $\hat y = X\hat\beta$. We're given a $x^*$ and asked to predict its response. We...
How can one objectively (read "algorithmically") select an appropriate model for doing a simple linear least-squares regression with two variables? For example, say the data seem to show a quadratic trend, and a parabola is generated which fits the data quite well. How do we justify making this the regression? Or how d...
I have a dataset with multiple correlated binary variables (0/1). Can anyone point me toward a solution for imputing completely random missing values based on information in the other variables? Below, I provide some code to create a simplified dataset with just 3 correlated binary variables. set.seed(123) # create cor...
I want to decide which are the most relevant attributes for clustering algorithms. My dataset has attribute this way: DBSCAN(data[latitude, Longitude, att1, att2, att3, att4, att5] ) DBSCAN(data[att1, att2, att3, att4, att5] ) What metrics should I use in this case ? Should I decide based on Homogeneity and Comp...
My question is: how one derives a Weibull distribution for a lifetime of a system where parts are wearing out with time? Provided that this is the lifetime analysis with aging is the main application of a Weibull distribution, I was surprised not to find a derivation why specifically this distribution and not any other...
Is it necessary to use cross-validatation to avoid overfitting when applying random forest algorithm? This is a question asked in my recent data scientist interview. Can anyone give any ideas? Thanks
I want to find the covariance between two random variables $X$ and $Y$, which are independent given another random variable $M$. I thought the calculation would be $$cov[X,Y]=E_M[cov[X,Y|M]] =E_M[E_{XY}[(X|M-E_X[X|M])(Y|M-E_Y[Y|M])]].$$ But since $X$ and $Y$ are conditionally independent, $cov[X,Y|M]=0$, and thus, $E...
I am wondering what exactly the notation dG(y) inside an integral means, what it's called and where I can read more about it: $$E[B_1]=\int_0^{\infty}E[B_1 \vert Y_1 = y] dG(y)$$
In the equation for Cook's distance: $$D_i = \frac{\sum_{j=1}^{n}(\hat{y}_j - \hat{y}_{j(i)})^2}{p MSE}$$ the value of $p$ is defined as "the number of fitted parameters in the model." What does this mean?
I am trying to specify a logistic regression model in JAGS. I am encountering an error I haven't seen before, and haven't found a solution online. I would appreciate if anyone knew what was happening. data<-read.csv("JAGSdata.csv",header=T) #read in csv file N <-length(data$study) #number of obs. M <-length(unique(dat...
I have a very simple linear model that I need to fit with a fixed slope (I'm interested in estimating the intercept). How would I go about describing the performance of the fit, since the usual r^2 doesn't apply. I'm reasonably handy with the math, so even a point in the right direction would be helpful. Doing it in R ...
If X has a uniform distribution of [0,1], and f(x) = e^X and g(x)=2^X. I generated 1000 values for X and applied to both two functions. And I calculated the variance after the transformation. The result shows that 2^X has a smaller variance. Why is this happening, isn't 2 larger than e, where does the variance come fro...
I have been playing with this SPSS data file, which is a class example from a university I am not enrolled in. In the original file there are 10 men and 10 women. I did a two-way mixed ANOVA with gender as the between-subjects factor and I also used a within-subjects factor "looks". Then I got rid of gender and just us...
Suppose I want to fit a lasso/ridge regression to a training set. Then, I need to choose $\lambda$, the regularization parameter. To choose $\lambda$, I can use two methods: K-fold Cross Validation (from An Introduction to Statistical Learning p. 227): Divide the training set into K folds (randomly). Choose one fold,...
I have some simple datasets that consist of a discrete integer-valued variable together with frequency counts. The frequencies vary a lot as does the value of the variable. For example one set has values from 1 to a little less than 15000 with frequencies from 1 to half a million. The small values have the many occurre...
I'm not big on statistics, so please excuse my ignorance. I have a video recording that I want to evaluate, I have an algorithm that can transform this video into a time series where I have 0 everywhere except for a couple of frames where an event (A) occurs. Then I have manual annotations of another event (B) that I t...
I have one dependent variable and multiple predictors. Dependent is continuous and predictors may be continuous or dichotomous. My sample is of 200 individuals. Each month, for 6 months, I have a measure of predictors for the 200 individuals and I would like to identify those which have a significant effect over the de...
I have a set of data points distributed like a bell-shape curve with varying amplitudes and widths. I need to parameterize these data points and a Gaussian with amplitude, width and offset parameters function is just perfectly suited. My y-values are defined between at 8 different points between [-2.3561 3.1415] and ...
I am studying on cognition and behaviors. I am lecturing linguistic courses and teaching linguistic terminology with visuals. In my research, just before each course, I asked participants 20 behavioral yes-no questions like "have you ever been bitten by a dog", or "have your ever watched Seinfel". Then I start my couse...
I Have read "Manufacturing Planning and Control for Supply Chain Management 6th Edition" by F.Robert Jacobs. I found the problem on the Periodic Order Quantities (POQ). As I know POQ calculation is after calculate the Economic Order Quantity (EOQ). In the book contained an example problem : To calculate EOQ from the a...
Panel estimators such the one implemented in the R package plm allow to estimate "individual", "time" or "twoways" effects. See page 11. When do I use which of the three possible specifications?
Let $A$, $B$ and $C$ be events in the same probability space. Does $$\begin{align} \mathbb P(A\,|\,B\cup C) \ge \mathbb P(A\,|\,B) \end{align}$$ hold?
I am trying to figure out how to interpret the coefficients when using several qualitative independent variables of which some have more than two categories. I found this short article that touches upon that issue (the one page preview is enough to understand what I mean but I will explain here too). The article says t...
I have 2 different variates W,X. I want to compute Gumbel copula for these variates. I followed following steps for the same: 1. To compute kendall's tau I used R's package Kendall. From kendall's tau I computed gumbel parameter(alpha) as alpha=1/(1-tau). Then I computed gumbel copula using R's package copula. functio...
I'm trying to analyze some factors contributing to win rates of a game, there are several hundred factors but each game will only have a small subset of them (10-20). Some of the factors may be correlated (picking one ability will tend to blend well with other abilities, and some may be antagonistic and so will not of...
I have a wind speed data series .txt file (1 year long), in which in each register I have the following info: date; hour; 10 minute wind speed average; 10 minute max value; 10 minute sigma An example of the data would be like this: 050206 0130 8.05 10.28 0.84 050206 0150 7.29 11.06 1.13 .... For each 10 minutes, the av...
I have a large set of time series data, consisting of series from two different conditions, the averages of which are shown below. I would like to fit a model to this data, to test that a) the peak value is greater in the 'conflict' condition, and b) the peak occurs earlier in this condition. ggplot(data, aes(x=Time, y...
I am currently trying to work out how to get from the Edgeworth expansion to the Cornish-Fisher expansion. I use van-der-Vaarts "Asymptotics Statistics" and Hall's book on Edgeworth expansions and the bootstrap. Unfortunately neither help much to get the details right (vdVaart p 338). tldr: Edgeworth expansions can be ...
I know that various questions already deal with this topic, but I don't think anyone has answered this before! I'm reading a paper in which the authors claim to use 20-fold cross validation to estimate the bandwidth of a Gaussian KDE. What does this mean? I've read up on cross validation for KDE bandwidth estimation, ...
How would you model risk aversion in an automated planner? This section in Planning Algorithms, briefly talks about this, but doesn't really describe a solution. However, example 4 is an interesting scenario: Suppose that you have performed the task and are about to win the prize. Just to add to the drama, the host off...
Is taking the average of different rmse valid? for example average rmse = (rmse1+rmse2+rmse3)/3 Thank you for your help!
It is well known that estimating large covariance matrices from small samples is problematic. For instance, the $p \times p$ sample covariance matrix $\Sigma_n$, estimated from $n$ samples, is not necessarily a consistent estimator of the true covariance matrix $\Sigma$ when $p > n$. In contrast, I am interested in the...
Question: Having performanced a linear regression in R with the lm function, I'm not sure how to interpret the results for the Intercept (as shown below). It seems the probability of the intercept's relevance is low (i.e. Pr(>|t|) is 0.845, and higher that 0.05). Does this mean I should drop the intercept from the mod...
is forecasting accuracy and trading profitability related? How to explain the existence of the relationship? Thank you.
I'm using a regression package that uses gam() from the mgcv package. Is it possible to include an L1 penalty with the gam function? The documentation indicates that an L2 penalty can be used using the H parameter, but I do not understand how, or if it can be used for the lasso as well. Splines are not in the model; th...
I am carrying out a logistic regression with $24$ independent variables and $123,996$ observations. I am evaluating the model fit in order to determine if the data meet the model assumptions and have produced the following binned residual plot using the arm R package: Obviously there are some bad signs in this plot: m...
I have the (inexact) measurement of N points. I also have access to the true value for M < N of such points. Suppose the measurement error is normally distributed. Based on this knowledge I could probably compute the mean ("error_mean") and SD ("error_sd") of the measurement error based on the M points for which I have...
I have to generate a homogeneous Gaussian Field with given correlation function of each points on a three dimension grid (500 x 500 x 500). A Cholesky decomposition method fails because of huge number of points so I need to find another method. Could you suggest me the best way to generation this Gaussian Field? Thanks...
I am referring to the site deeplearning.net on how to implement the deep learning architectures. I have read quite a few research papers on document summarization (both single document and multidocument) but I am unable to figure to how exactly the summary is generated for each document. Once the training is done, the ...
I like to know if we can model binary outcome with time series predictors. For example lets say Y is binary. $X_1, X_2, X_3,...,X_n$ is the same predictor variable but is a historical snapshot over time period $1,...,n$. I am interested in predicting $Y$ but include the auto correlation among $X_1,...,X_n$ and seasona...
Assuming $A_1, A_2, \ldots, A_n$ are independent exponential random variables (each having the same parameter and, for the sake of simplicity, let's assume the value of the parameter is 1). Define $B_i = A_i + k$ (where $k$ is a constant of unknown value). What would the maximum likelihood estimate (MLE) of $k$ be, if...
I am a school teacher doing a small project that involves collecting data on 5 different teaching methods and the resulting test score of children who are taught was each teaching method. I have 50 students equally split among the 5 teaching methods (10 students/method). The data I have is as follows. Each line below i...
It is assumed that: 1) $y=q+u$ Where $q$ is productivity and $y$ a testscore that measures true productivity. $u$ is a normally distributed error term, independent of $q$, with zero mean and constant variance; $q$ is also assumed to be normally distributed with a mean equal to $\alpha$ and with a constant variance....
I'm reading a paper where the authors are using Wilcoxon-Mann-Whitney loss function while minimizing an objective function. As the authors say in the paper, the role of the loss function is to give a positive value (penalty) when the input to the function is positive and it gives a zero otherwise. Here's the equation o...
I'm testing the hypothesis that the the variance observed in the number of medical consultations felt from 2009 through 2013 is due to the variance in user fees price, and not due to something else. I have 3 time series (from Jan. 2009 to Dec. 2013, measured quarterly) corresponding to the following variables (same po...
I understand naive Bayes is used largely in text classification. However, the number of features tend to outnumber the number of documents. Does this not result in overfitting where the number of parameters outweigh the number of samples. I am trying to classify a set of documents using multinomial naive Bayes but how...
I'm attempting to learn Bayesian modelling with PyMC, so I have been going through Cam Pilon Davidson's Probabilistic Programming for Hackers. I literally copied his code from chapter 1 and used my own storm data. Here is the ipython notebook of my code. My problem is with the posterior distributions. One of them retur...
I am working out the difference between two angles from a circle, and I work out the mean difference across 96 trials in 10 separate samples. In order to detect outliers for statistical analysis, Barnett & Lewis (Outliers in Statistical Data, 1984) suggest the use of a von Mises basic model (at section 7.1). Is a von ...
I have read now a couple of times that the rate of false positives is upper bounded by the significance level alpha regarding hypothesis testing, and does not depend on sample size. But how so? As far as I can see, the probability of drawing only extreme values is much smaller when the sample size is 1000 than say 3.. ...
I need to use Lohr's (2d Ed) method of calculating a standard error for an estimate generated from a ratio estimator based on a stratified sample. In working out her example on page 145-146, I find that the fraction in her example is calculated opposite to how she shows it in her MSE equations on page 144. Specifically...
I have panel data and am interested in changes in total expenditures. I would like to consider an instrumental variable approach to deal with an endogenous regressor – the short run elasticity of income, lagged by 3 years. There are two ways I can think to do this: I could calculate the elasticity using all years an...
I want to use caret to compare two different classification algorithms. For example SVM and Elastic net. I want to put aside some samples for test set and then use the rest of the samples for training the model, which involves tuning some parameters (like alpha and lambda for elastic net) for which I use cross validat...
When is it appropriate to use a backward method in regression? I have read that it is permitted for exploratory model-building, but I have also read negative things about it. I am making a model about streaming. The 12 predictors I chose are based on theory. The enter method is not an option, because when I put all in...
I want to do dimensionality reduction on a data set $X_{ij}$. In this case, $i$ indexes samples and $j$ indexes a large number of variables (densities at different locations in space). The units of all elements are the same, but the uncertainties (which I can estimate) vary quite a lot, mostly across samples. Each $...