instruction
stringlengths
9
38.7k
Assume I have the following data points: x1 x2 x3 x4 y 0.0001 0.0260 0.0691 0.9048 0.1 0.0001 0.0501 0.1001 0.8497 -0.3 0.0001 0.0001 0.0001 0.9997 0.2 0.1001 0.0001 0.8997 0.0001 0.3 0.9496 0.0001 0.0501 0.0001 -1.3 0.5998 0.3000 0.1001 0.0002 -3.2 . . . ...
I do not have a specific example or task in mind. I'm just new on using b-splines and I wanted to get a better understanding of this function in the regression context. Let's assume that we want to assess the relationship between the response variable $y$ and some predictors $x_1, x_2,...,x_p$. The predictors include s...
I have conducted A/B test on Newsletter send outs regarding title length over 10 week period. One group of people during those weeks always got long title, other short version of title. Newsletters did not differ in other things then title, content was same. To check if in one particular case one of the newsletter in p...
How can 2 stock have different Average return and different standard deviation and Still have the same probability distribution
In a book I'm reading I've come across the following quote: Accuracy on the test set is a good performance measure only when there is a relatively uniform distribution of target categories in the training set. If the real world categories are distributed 10% A and 90% B, then should the training categories also be 10...
An excercise question for time series analysis asks: Consider the process $$ y_t = 0.8y_{t-1} + 0.1y_{t-2} + u_t $$ Is this process weakly stationary (I would answer this with the stability triangle) Under which assumptions does this property imply strong stationarity I thought that strong stationarity always implies...
I have a data set constisting of gender and years (2010 representing before the improvement and 2012 representing after the improvement) and another table comparing age against the years: Before After 2010 2012 420 365 628 503 (1st row = women, 2nd row = men) Before After ...
I'm not an expert in Mathese, so hopefully this makes some sense.... I have a least squares problem with a lot of predictors, many of which are indicator variables (0 or 1). I use a sparse matrix because of the number of predictors and rows. I solve with Gauss-Seidel regression and that works fine. I'd like to calculat...
I'm working on the Loan Prediction III contest on Analytics Vidhya. The dataset is composed this way: Loan_Status: Loan approved (Y/N), target variable Loan_ID: Unique Loan ID Gender: Male/ Female Married: Applicant married (Y/N) Dependents: Number of members in the family Education: Applicant Education...
What is the distribution of $X$ if $$ X \sim \text{Poisson}(\lambda), \quad \text{where }\lambda \sim N(\mu,\sigma^2)$$ or $$ X \sim \text{Poisson} (\lambda), \quad \text{where }\lambda \sim Bin(n,p) $$ where $n$ is very large. Detail and motivation In biology, next-generation sequencing is often used to quantify ...
I am currently working on reproducing a paper where the authors (non-statisticians, as far as I know) wanted to solve a classification problem, but had a dataset that was balanced 17:1 in favor of one class (20134 vs 1186 instances). Their solution was the following (Sect. 5.2): [...] we generate balanced data for cla...
I can use central limit theorem and say that for large N it resembles a Gaussian, due to which relative error falls off as $1/\sqrt{N}$, but is there some intuitive way of understanding it?
I have a model with a ordinal dependent variable: low, medium, high (coded as 1,2,3). There are around 13% data with 1, 55% with 2, 32% with 3) $n=200$ and there are 10 continuous predictor variables. I carried out ordinal regression. But since $n$ is relatively small, dependent variable has 3 variations and data in on...
I'm trying to understand the justification behind clipping in Proximal Policy Optimization (PPO). In the paper "Proximal Policy Optimization Algorithms" (by John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford and Oleg Klimov), on page 3, equation 7 is written the following objective function $$L^\text{CLIP}(\...
If I have two temperature probes measuring the same substance will the average of the two increase the uncertainty? Propagation of uncertainty says yes but I'm trying to justify it in my head. Treating each probe as another deminsion: $$u_{tot}=\sqrt{(u_1)^2+(u_2)^2}$$ If the uncertainty between the two devices are e...
I am confused that the recursive feature elimination is supervise or unsupervised? In other words, can we use the recursive feature elimination technique on a dataset with no class labels? Any comments thanks
I have several non-stationary time-series I use as predictor variables for time-series changes in bond market liquidity. I aim to do the forecasting with VAR models. I know that for inferences, the VAR model should be specified in differences when data is non-stationary. However, I read in a comment to this question (V...
I have recently come across a testing design that Adobe uses in their "Adobe Target" tool that they call "Auto-Allocation". Here is their article on the test design. https://marketing.adobe.com/resources/help/en_US/target/target/automated_traffic_allocation.html I am rather dubious of this testing procedure, as the id...
In simple linear regression, $R^2$ is equivalent to the squared correlation of a dependent and an independent variable. Is this also true for multiple linear regression? For example, I measured trait openness to predict creativity in a simple linear regression. If I square the measured correlation between the two, I ge...
I am having quite a bit of difficulty in reading some economic explanations regarding, e.g., orthogonality, robust standard errors, etc. Often I am thrown off by the use of certain notations. I am left wondering if, e.g., E[X|Y] (the expected value of X conditional on Y) is also sometimes written as (XY), or [XY]. And...
Consider a continuous random variable $F''$ following a doubly noncentral $F$ distribution with $8$ and $2$ degrees of freedom, and noncentrality parameters $0$ and $10$; which is to say: $$ F'' \sim F_{8,2}(0,10) \text{.} $$ [Actually, $F''$ can be also seen as the reciprocal of $F'$ following a (singly) noncentral $F...
I'm trying to understand the LASSO-path algorithm that is described here on page 9&10 (Sparsity and the Lasso by Tibshirani & Wasserman, 2015). First they say we initialize $\lambda_0 := \infty$,$s_A = A = \emptyset$. But I don't understand why we set $A = \emptyset$ as all the following computations involve $X_A$ whic...
I noticed that the Holt-Winters function in the "forecast" package in R contains prediction intervals. This was interesting, as it is not intuitively obvious to me how prediction intervals could be calculated for the HW model. I can/will read through the R code for the forecast package to find out the specific metho...
This must be bog standard (if so, references would be appreciated): Suppose I have a (time) series $a_1, a_2, \dotsc, a_n, \dotsc.$ I make an infinite by $k$ Hankel matrix $H(k)$ in the "obvious" way: $$\begin{align} &a_1, a_2, \dotsc, a_k\\ &a_2, a_3, \dotsc, a_{k+1}\\ &a_3, a_4, \dotsc, a_{k+2}\\ &\dotsc \end{align} ...
Boltzmann machines are stochastic recurrent neural networks with a specific architecture, and they are interesting in several contexts. They are stochastic in the sense that the sampling procedure involves repeatedly computing the activation functions for the next layer (hidden from visible or visible from hidden), sam...
I am conducting a random forest analysis in which a predictor is naturally correlated to the outcome. That is, the predictor is the amount of sunlight a patient received during his admission in a hospital, the outcome is the length of stay in the hospital. The longer the length of stay, the more sunlight the patient re...
I'm facing this new concept: the quasi likelihood. I'm looking for some clear explanation of what it is. I have a very basic knowledge about this, so I need to go step by step very slowly. I discovered this concept in dealing with overdispersed count data. Quasipoisson models will estimate relative rates with no distri...
I've been able to model the probability of multiple successes where the probability of each success is the same, but I am unable to figure out how to model the combined probability where the probabilities of individual successes are different. By example: If I roll 10 six-sided dice, the probability to roll five fours ...
I'm a stats noob and this isn't a homework question, but I'm just looking for a way to approach problems like this anyway - not an actual answer. Question: Two random coins are selected from a bag of coins which have random biases. All possible biases are equally likely. The first coin is flipped 5 times, and the seco...
I have a 4 year long daily time series for the gross margin (GROSS_MARGIN) of six different production plants (PLANTS, factor). For one of these plants, a treatment was applied at some point in time (so it has a before/after set of observations, TREATMENT). This plant was marked as case, the others as control (factor, ...
I have a problem with my data analysis (with structural equation modelling -SEM). In detail, I have 3 indicators/variables that are quite close together, the existence of all of them in the model might be redundant (reliability composite is a bit high, at around 0.91-0.93). So I am thinking about simplifying some measu...
I'm running a regression of firm productivity (output per worker) on income by looking at how wages change when employees switch to a more or less productive firm. When I regress log of firm productivity va on log of wages y, the coefficient is ~0.23. However, when I regress the change in firm productivity dva on the c...
I have been thinking about one thing after reading documentation from sklearn about Feature Selection for building prediction models (http://scikit-learn.org/stable/modules/feature_selection.html#rfe) More specifically 1.13.3 --> Recursive Feature Elimination The criterion used to eliminate variables is the coef_, whi...
Let's say I am conducting an observational study in which a group that received treatment (T+) is matched to another group (T-) using propensity score analysis where I use the "throw-the-kitchen-sink" methodology and include all risk variables. My question is when doing post-match analysis with conditional logistic reg...
This question consists of two - but possibly related - parts. Question #1 We have data on the occurrence of a disease in several age groups over several years. We try to investigate the secular trend of the disease (i.e. how it changes over the years), we will use negative binomial regression with splines for that end,...
I have a time series of 61 monthly observations and I would like to build an ARIMA forecasting model. To test my model, I separated my data into a training set of the 51 first observations, and a test set with the remaining 10. Now my question is, when I am plotting the ACF and PACF to get an idea of the appropriate p...
I have linear mixed effects model looking at EEG recordings hourly for 6 hours over 3 conditions (and each subject undergoes each condition) with N=12 animals. I am using lmer in lme4. Model: model = lmer(EEG ~ Condition*factor(Hour) + (1|Subject) However my residual plot looks like below: QQ Plot: Is there any way...
I already know a good deal of measure-theoretic statistics from 1 semester-long course. I want to learn machine learning. The "Bible" in this field seems to be Elements of Statistical Learning. I have skimmed a few chapters, and it feels a bit of a tough read for my current level, but I do believe that I could manage...
I have been asked to comment on the use of NNT (number needed to treat) and NNH (number needed to harm) in observational studies. My intuition doesn't give me any reasons these would be problematic and a brief Google search did not find any, either. Of course, there are the usual problems of observational studies, but...
I am running simulations from a paper on graphical clustering based on latent positions. Essentially, the first step is to do Multidimensional Scaling on the Adjacency matrix, after which the authors select the 'best dimension' by doing an elbow fit. When they truncate the MD Scaled data to only use a few dimension, th...
I am working with the following monthly time series to build forecasting models: From this plot, it's quite tricky to identify if there is some kind of seasonality or not. When I use the ets function, it comes up with a ETS(M,N,N) which I believe suggests non-seasonal data. However, my auto-arima function comes up wit...
I'm looking at sales data with sales at different prices over time, I can't figure out a good approach to getting the: 'If we increase our prices by 1% how much will our demand change by? ' the data i have looks as such: Individual line item sales, associated with whole orders, associated with accounts. I've tried gr...
I am using sklearn library to train the default SVM classifier on a bunch of data. My data has roughly 30 features. But I realize some of these features are "more important" than others. For example, I want the change in features 1, 2, and 3 to greatly impact the learning process, whereas, features 4 through 25 are use...
All of my confusion began when I tried to graphically demonstrate the effect of SD and mean difference to power when comparing to independent groups. I drew a graph like this to demonstrate a Cohen´s d of 0.2 (from rpsychologist.com) Then I tried to highlight the α, ie. the tails of the treatment population, to show t...
In the book «Introduction to Time Series and Forecasting», by Brockwell and Davis, the authors state in section 1.5.2.1 (3rd edition) something which I summarise below. Sample: $\{x_1,..., x_n\}$. We first estimate the trend by applying a Moving Average Filter (MAF) chosen specially to eliminate seasonality and to d...
Is there a way in rpart to force the variables only used once when doing the splits? A data scientist named Tao once asked: This is how the question came about. Often, the tree constructed uses the same variable (say X1) for the first and second splits, for example. However, due to practical reason, the researc...
I am fitting regression models using closely related and highly collinear critical variables. I have used a few collinearity-reduction techniques, such as: PCA, variable selection. Nevertheless, there is scope for further reduction. Since my primary goal is to perform do inference on the variables, dimensionality r...
I'm now starting with Gaussian Processes and I have a doubt related to it. I find this topic quite difficult to me to get started. I have a $f\sim\mathcal{GP}(0,K)$. Now I have the data $x$ and $p(f|x)$ follows a Normal distribution with mean 0 and covariance $K$ over the points of $x$. Now I have noisy data $y=f(x)+\...
I am dealing with a large data set (~100000 observations, roughly 13 variables). Most variables are of categorical nature and are stable across different observations concerning the same individual/entity, e.g. social class or income, however some are not. My Problem is rooted in the fact that there is a varying numbe...
I have clinical data, where patients are grouped into three groups. However, when I classify group 1 vs 2 (based on their behavioral data), and apply the trained classifier onto group 3, group 3 is almost always predicted just as group 1. Now I am interested into understanding if it really makes sense to divide the pat...
Let $Y_1, . . . , Y_n$ be a random sample from a zero-truncated Poisson distribution with probability mass function: $p_Y (y|λ) = k\frac{λ^ye^{-y}}{y!},$ $k > 0, λ > 0, y = 1, 2, . . . ,$ where k is an unknown constant. I know that the sum of a probability mass function is 1, but I do not know how to use this i...
I understand that feature scaling speeds up gradient descent by making the geometry of the cost function more hospitable (i.e. more circular), but why is mean normalization useful? Doesn't it just "move" the cost function closer to the origin?
If I want to determine the difference between two correlated measurements (i.e., pre-post scores), is a one-sample t-test on the difference scores compared to 0 an identical test to a paired sample t-test?
I'm developing a predictive model on a dataset of about 25K observations with the response variable having ~60 classes. There are ~130 predictor variables, all of them binary. In this problem I care about predicting the right probabilities on the response variable and not about predicting one single value. I'm dealing ...
Is there any classification algorithm that assign a new test vector to the cluster of points whose average distance is minimum? Let me write it better: Let's imagine that we have $K$ clusters of $T_k$ points each. For each cluster k, I calculate the average of all the distances between $x(0)$ and $x(i)$, where $x(i)$ i...
Let u be error and u~N(0,$\sigma^2$) Then what is this $E(\log u )=$? Is this equal to zero? And$E(u^a)=0$? Where a is scalar. Thank you.
I am trying to fit a count regression (rate model) of the form $y_{r,k}$ ~ $Poisson(N_k t_r^{-\alpha}exp(X_k\beta) + \delta) $. This looks complicated, so let me explain. (1) $y_{r,k}$ are the counts that we observe for group k at time r. (2) $N_r$ is the total "population" in the group r. (all groups have obeservat...
I have measured a continuous & categorical outcome variables in three groups of patients, where the groups are defined by time periods 2010-2011, 2012-2014, 2015-2016. I would like to test for a "trend" among these three groups--that is, does the continuous/categorical variables increase or decrease across the study pe...
Supposed in a population, I take a sample with a size of 1500 to build a 96% confidence interval for the true mean $\mu$. Then such an interval is assumed to range from 6.8 to 8.0. Assume the sample mean is $\overline{x}$. Then I conclude that: if a sample with a size of 1500 were repeatedly constructed, then over a ...
To prove sample mean is an unbiased estimator of the population mean, we use the following step, $\mathbb{E}[\sum \frac{X_i}{n}] = \frac{1}{n} \sum \mathbb{E}[X_i] = \mu$, given that $\mathbb{E}[X_i] = \mu$. Now my question is if we take say first random variable $X_1$ as an estimate we can go ahead and say that sinc...
I have some trouble to determine the probability of the following example There are 3 blue balls, 5 red balls, and 4 white balls in a bag of balls. If a person selects two of the balls, what is the probability that the second one is blue given that the first one was white? A=White B= blue p[B/A]=p[A and B]/p[A]= p[...
I use a logistic regression model for reranking some documents where a normalized features of some candidates may have negative real value so that its predicted value may get lower score(low likelihood for positive class). I am doing this on Weka within a Java program without using arff file. Can I use a negative valu...
I've learned PRML recently but get stuck in a math problem. this exercise is to calculate $KL$ divergience of $2$ multi Gaussian $$ N(\mu,\Sigma)\ \ \ and\ \ \ N(m,L)$$ but I do not know how to derive the Tr part the $\operatorname{Tr}$ term is derived from $$\int e^{\{-1/2 (x-\mu)^T\Sigma^{-1}(x-\mu)\}}{(x-m)^TL^...
I've been out of academia for the past few years, so my knowledge of statistics is very rusty and I would love some help with my interpretation. I'm trying to validate my hierarchical clustering solution produced by using wards/squared Euclidean distance (SPSS). I'm trying to replicate this in R to validate my solution...
Is this variable nominal or ordinal?
Intuitively, if X can predict Y in a multiple linear regression model, $y$ = $\beta_0$ + $\beta_1$$X$ + $\beta_2$$Z$ + $e$ X and Y are associated. Since there's an association between them, why is it not guaranteed that I could predict X by Y? Why is the relationship asymmetric? Or is my conception incorrect?
I now have seen several papers that analyze U-shaped or inverse U-shaped relations among variables (in a regression framework). The general understanding I have from there is that it is a specific type of a non-linear relationship that we can all easily visualize. However, I am a bit confused about how exactly people ...
I am doing model assessment and comparing models using RMSE. How can I easily get to RMSE to plot comparison in gam library or is this not possible? in train I am using: gam.m9=gam(Y~s(x1,6)+s(x2,5),data=train) and prediction p.m9=predict(gam.m9,newdata=test)
I am working on a dataset which contains numerical and nominal data with some missing values, using scikit-learn. Steps I followed for preprocessing are: 1. Filled missing values with mean and mode 2. performed encoding on data(label encoder()) 3. Performed splitting of data and then normalization 4. Classification by ...
I would like to efficiently generate $k$-sparse matrices, i.e., matrices that have only $k$ nonzero entries. The catch is that all such matrices must be different. Matrices are filled with 1 at the $k$ nonzero entries and zero everywhere else. Unique means exactly identical. I can't randomly fill each new matrix at $k...
I'm currently working with R on some oculometric data produced after an experiment I made. I have two conditions ("Risky" & "Safe") and 3 mental states ("Focus" & "Around" & "Mind wandering"). I put subjects doing both condition. Each 2 minutes on average they had to report there mental state ("Focus" & "Around" & "Min...
I want to apply a 2D rotation of a $\theta$ angle to my two first principal components of a PCA. What I understood from this post is that I have to apply a rotation matrix R : $$ R_\theta = \left( \begin{array}{ c c } \cos{\theta} & -\sin{\theta} \\ \sin{\theta} & \cos{\theta} \end{array} \right) $$ If t...
I am trying to understand a part of the paper 'From optimal transport to generative modelling: the VEGAN cookbook' by Bousquet, Gelly, Tolstikhin, Simon-Gabriel and Schölkopf. There is a one-liner in this paper that I am struggling to understand. For self-containedness I will state the problem here: Consider the set of...
I am going through Casella's statistical inference in one-semester standard statistic course and have mathematical background from Sheldon Axler's linear algebra done right and Louis Brand's advanced calculus. I wish to self-study these topics: Lindeberg condition Analysis of variance Akaike Information Criterion Baye...
I have a dataset with multiple cars from the same brand and some of them they develop some problems but not really broke down. For example, tires are operating at 70% in 2000 and then 60% in 2005. Can I find their life expectancy in 2010? I have only two-time data points (2000-01-01 and 2005-01-01) but many different o...
I am trying to cluster gas wells based on their production behavior based on Gas/Water ratio vs cumulative water produced plots. Would appreciate suggestions to solve this problem.
I am trying to determine wether the time series data I have is (covariance) stationary or not. This is the hourly data: I proceeded to look at the acf as well as pacf plots in order to determine what kind of stochastic process might underlie the data. Looking at the plots I would strongly assume that the data follo...
In Chen and qin (2010) (available here), a moving average structure for generating moving average model introduced that is like this: $ X_{jk} = \rho_1Z_{jk} + \rho_2Z_{j(k+1)} +\dots+ \rho_pZ_{j(k+p-1)} + \mu_{j} $ which $j \in \{ 1,2,\dots, n \}$, $k \in \{ 1,\dots,p\}$, and $n$ and $p$ are size and dimension of dat...
I am performing a model selection based on BIC (Bayesian information criterion). I start with the following model fitted with rma.mv() in the 'metafor' package: res<-rma.mv(yi~Nadd*(MAT_e+MAP_e+Ndep_e+Fert+Duration.yr),vi,data=pfg,random=list(~ 1 | Experiment,~1|Species),method="ML") I get the following output: Multiv...
I want to draw tuples of $N$ random numbers $v_{ij}$ with $i=1,..,N$ the tuple index and $j$ the repetition of the experiment. The sum of all random numbers in a tuple should be constant $\forall j \sum_i v_{ij}=S$. The expectation and variance of each $i$-th index in the tuples should be known $\mathrm{E}_j(v_{ij})=e_...
I'm looking for a way to fit survival trees with competing risk. Can I use the function LTRCART in the LTRCtrees package in R to fit a survival tree using the dataset obtained from the finegray function in survival R package. Here a reproducible example using mgus2 data in survival package: library(survival) data("mgus...
I have an time series data with an appearance of a headache events over time. Each headache is characterized with intensity (1-5) and duration (in seconds). Therefore, the signal is represented in 3D - intensity frequency and duration. I would like to have a metric per day - to represent a day with some "rank of he...
Given the metrics A and B, applied on the same data, resulting in (normalized) scores, I use Pearson correlation between them and the gold standard. I get almost exactly the same Pearson correlation score for Pearson(A, gold-standard) and Pearson(B, gold-standard) which might at first glance mean that the two metrics p...
Assume that a $n$-dimensional vector of real valued variables $\mathbf{Y}=(Y_1,...,Y_n)^T$ is given. We know that they are jointly normal which expectation vector $\boldsymbol{\mu}=(\mu_1,...,\mu_n)^T$ and Variance-Covariance Matrix $\boldsymbol{\Sigma}\neq I_{n}\sigma^2$ (i.e. the observations are dependent). So we h...
Consider I have a training set where each data sample is a tree and each node has(including leaf node) its own feature vector. For example, single data sample will look this Now I have to classify leaf nodes to either of two categories(category_1 or category_2). Can some one please recommend feasible neural network va...
What is the proper way to calculate bootstrap regression coefficients CI after MI? I mean is using a pooled bootstrap SE over imputed data sets with a pooled estimate of bootstrap regression coefficient across MI data sets better or using list of bootstrap SE and regression coefficients estimates for each MI data sets?...
1) What is the difference between explicit and implicit mapping 2) What is the difference between mapping and kernel trick?
What will be the best statistical way to analyze presence/absence of multiple discrete variables for a given sample. Following is example data which shows 4 variables, each of which can be only Yes or No. case A B C D 1 yes yes no no 2 no no no yes 3 yes no yes no 4 no no no ye...
I have this relatively small dataset (41 observations, 5 independent and 1 dependent variable) and built a linear regression model with interaction terms. Now I want to put confidence intervals around my coefficients. At first, I created them based on the std. error estimate of my OLS-Regression (similar std. errors fo...
I would like to understand how model based bootstrap works. Am I right that this is a technique that allows for the derivation of Inference in cases where the model is too complicated for analytical derivations? So if my model assumes that my response $Y$ comes from a distribtion function $f_Y(y,\theta)$ and I am able...
I am trying to solve a multi-target tracking problem, which is in some parts different to some filters I have already researched such as the PHD filter. I am asking for advise which filters to start looking at given that: I need to track multiple but a known and fixed number of targets (there are no deaths/births) The...
I would like to compare AIC values of a single growth curve fit to an entire dataset vs. the combined AIC values of two growth curves (one fit to male data points in blue and one fit to female data points in red). Is this possible?
I am working to publish some hierarchical clustering indicating phenotypes in a disease population. I log transformed and min-max normalised my input vairables, and used Ward to identify clusters. In order to select k (where to cut the tree), I used 3 statistical methods - GAP, elbow and silhouette, and selected the "...
We place ourselves in a multi-armed bandit setting. Each arm yields a stochastic reward in $[0,1]$ under an unknown distribution. After several pulls ($n_i$ pulls for arm $i$), we collect a dataset of observations: $$ \mathcal{D} = \{\{x_{ik}\}_{k\in[1,n_i]}\}_{i\in[1,m]}$$ How can I measure the probability that arm $i...
I found my dependent variable is first difference stationary, but does this mean I have to use the first difference as my dependent variable? Or can I use my original variable as my dependent? My dependent variable is $\log(Y_t)$. I found that $\log(Y_t)-\log(Y_{t-1})$ is stationary. Can I then use my original $\log(Y...
I have a binary classification task with high class imbalance - the mean y is 0.014. Data consists of 100,000 rows and 40 columns. If I select rows where no column is NA I only get 10,000 rows back i.e. there are many NAs. I know how to impute mean in python: imp = Imputer(missing_values='NaN', strategy='mean', axis=...
I am doing a SVM classification using e1071 in R. I split the data between a training set and a test set. I previously thought that I needed at least 10 data points in the training set to run the svm (for the cross-validation of the svm tuning), but I just realized there is no technical restriction and that my code als...
I'm trying to run a Discrete Choice Conjoint Analysis for a financial insurance product. When coming up with the cards for the experiment design how do you avoid combinations that are clearly "better"? For instance if your attributes are Benefit Amount - (\$1000, \$2000, \$3000) Benefit Period - (10, 20, 30) Price - (...
I have performed a logistic regression to estimate the default probability of a dataset of firms based on some basic balance-sheet ratios. I have winsorized all the ratios at the 1st and 99th percentile. My question is: now that I want to use my estimated model on a new dataset for forecasting purposes, should I also ...
I am reading on instrumental variables estimation in linear regression, and specifically, two stage least squares estimation. Assume we have a model $$y=X\beta+\epsilon$$ Where $X$ is correlated with $\epsilon$ but we have instrumental variables $Z$ that are not correlated with epsilon, but with $X$. The book by Gree...