instruction
stringlengths
9
38.7k
I've been working on a power analysis for an RCT study for a psychological intervention. And I've been wondering how one would estimate the covariance matrix (or rho) for repeated measures data? This is more of an academic question, since I have data from previous studies that I can use. But I'm curious what one would ...
This has been driving me crazy, so I thought I'd come and ask for some help: I'm doing a study involving content analysis of newspapers. The unit of analysis is each day, adding all stories for the day. Overall, there are 4 variables for each case (i.e. number of stories per day, column-inches total, etc.). After co...
I've proposed using an anomaly detection algorithm in a project. The algorithm would consist of choosing some features we think might be indicative of anomalous examples. Then using a training set of anomalous and non-anomalous examples to fit parameters to a Gaussian distribution. We would then use these parameters...
I am using an analysis for an experiment that I consider suboptimal. I am asking for any suggestions to improve this. I will briefly outline the experiment and what I’ve done, then ask your advice. The experiment is a two-alternative forced-choice task. Participants view two images side by side. Immediately following, ...
I conducted an experiment but I have difficulties in finding a proper statistical analysis. The experiment consiste of a listening test in which participants had to rate the audio stimuli along 5 scales representing an emotion (sad, tender, neutral, happy and aggressive). Each audio stimulus was created in order to rep...
I do not know a lot about stats so forgive me. I have a dataset which has $N$ number of participants and their choice between 1, 2, and 3 at any given point. I want to analyze the distribution of the choices between 1, 2, and 3 by participants' age and sex. How would I set up a test to look for significant interacti...
Suppose we have count data. It seems that a generalized ARMA model would be good to use. In Rm these is function: garma(link = c("identity", "loge", "reciprocal", "logit", "probit", "cloglog", "cauchit"), earg=list(), p.ar.lag = 1, q.lag.ma = 0, coefstart = NULL, step = 1) Why...
Suppose we have some house price data for 30 years (1970-1999). This is yearly data (30 data points). Suppose some major event $X$ happened on 1980. I want to see whether this event affected prices later on. Is using median filters a good methodology for detecting outliers in later years?
I want to perform K-means clustering on objects I have, but the objects aren't described as points in space, i.e. by objects x features dataset. However, I am able to compute the distance between any two objects (it is based on a similarity function). So, I dispose of the distance matrix objects x objects. I've implem...
Suppose I wish to regress $Y$ against a normalized $X$, but I would like a sparse solution. After regression, why is discarding the coefficients with smallest magnitude not allowed? For the record, I have heard of, and often use, LARS and LASSO methods. I'm just curious why the above approach is not applicable.
I have read possible explanations for Lurking Variables and Influential Observations but I can't seem to construct a good example for myself. A well-designed experiment includes design features that allow researchers to eliminate extraneous variables as an explanation for the observed relationship between the independ...
Is there a good published expository account, with mathematical details, of the various approaches that have been taken to the Behrens–Fisher problem?
I now ran into two variables that give me problems. I know that I want to try to include them in the final model, but I'm unsure how the values should be treated in order to reflect the true nature of the phenomena they are reflecting. Case 1 The variable depicts the age/duration of a certain contract type. If the cus...
Let's say I'm analyzing the incidence of pathological lesions, observed during necropsy. No information is available about when the lesion occurred before death. So, I'm using a general linear model $Y_i \sim \beta_0+\beta_{sex}+\beta_{treatment}+\beta_{age}$. $Y_i \in \{0,1\}$ is whether subject $i$ has the lesion or ...
I have a mixed design that includes both repeated (condition) and between (sex and genotype) subjects factors. I would like to assess whether my data meets the normality assumptions for 1) General linear models (repeated) and 2) linear mixed models using SPSS. What is the best method for doing so? Assuming that I find ...
I'm trying to build a one vs all multi-class classifier in R and my results are pretty poor. I'm curious if anyone can suggest a piece of example code somewhere on the internet. I'm trying to classify some text. There are 5 classes that the text strings could fall into. When I search for 'one vs all classifier' I ge...
I have a very sparse set of measurements of a quantity, around 10 measurements at different locations across a continent. The distributions of locations is highly irregular. I would like to smooth these into values on a regularly spaced grid over the continent. We actually have a much denser set of observations of a re...
Is there any particular reason you will choose the kernel density estimation over the parametric estimation? I was learning to fit distribution to my data. This question came to me. My data size is relavtively large with 7500 data points. Auto claims. My goal is to fit it to a distribution(nonparametric or parametric)...
I need to perform a logistic regression to to see if a group of variables which are found to be significantly associated with an outcome (by univariate tests) have significant impact on the outcome when they are put together. In this case, from my reading, I gathered that in SPSS I need to use the enter method. When I ...
I’m working on a classification system which consists of an auto-encoder for feature learning and logistic regression for classification. The system has five hyper-parameters as enumerated below. Number of features it's learning via auto-encoder Weight decaying parameter of the auto-encoder Weight decaying parameter o...
I've been reading the manual about GLM, specifically the one on the elastic net in this link, and they come up with the following function to minimize: $$\frac{1}{2n}||Xw-y||^2_{2}+\alpha \rho ||w||_1+\frac{\alpha(1-\rho)}{2}||w||_2^2,\ \ \ \ \ \ \ \ \ \ \ (1)$$ where $n$ is the number of samples and $w$ are the coeff...
At the moment I have $5$ paired samples for correlation. Spearman's R is $0.2$ and the $p = 0.78$. How do I calculate the number to extra samples I would need to get a more significant p-value?
Is it possible to calculate or approximate the probability of something extremely unlikely happening once over a large sample, i.e., in situations where the probability is smaller than machine error? For example, I was trying to calculate the approximate likelihood of someone sharing my genome. Apparently an individual...
Models of biased coins typically have one parameter $\theta = P(\text{Head} | \theta)$. One way to estimate $\theta$ from a series of draws is to use a beta prior and compute posterior distribution with binomial likelihood. In my settings, because of some weird physical process, my coin properties are slowly changing a...
I've been using the MCMCglmm package recently. I am confused by what is referred to in the documentation as R-structure and G-structure. These seem to relate to the random effects - in particular specifying the parameters for the prior distribution on them, but the discussion in the documentation seems to assume that t...
I have a problem where I am given an initial prior or proportion for the number of occurrences per some unit with known standard deviation (an example is 3 per mile). I wish to test if this proportion is valid given a live exhaustive sampling of the area. So I would plan to use all the sampled information. I underst...
The outcome of interest is disease yes/no (coded 1/0) and the continuous variable of interest is measured in nmol/L. The output of the regression suggests that a 1 unit change in the predictor (presumably a 1 nmol/L increase) results in a 3% reduction in disease. This is significant. However, I think it would be more m...
I have performance review data and scores (ranging from 1 to 4) for employees of a company. I need to show the company average over the past year. However, the employees were only ever reviewed for a few weeks in a row at a time. For example: Roger was reviewed from Jan 1 through March 1 Steve was reviewed from August ...
(If this doesn't make sense it is because I am inexperienced at statistics) Assume I have a broad universe of actions $A$ I could pursue, and for each $a_i \in A$ there is an associated characteristic $x_i \in X$, where $X$ is drawn from a normal distribution centered at 0 with standard deviation 1. Let's also say ther...
I would like to test the difference in response of two variables to one predictor. Here is a minimal reproducible example. library(nlme) ## gls is used in the application; lm would suffice for this example m.set <- gls(Sepal.Length ~ Petal.Width, data = iris, subset = Species == "setosa") m.vir <- gls...
When I run a $2 \times 4 \times 5 \times 6$ (Sex $\times$ AgeGroup $\times$ HighestDegree $\times$ Ethnicity) MANOVA (with 20 dependent variables) in SPSS, it presents tests of between subjects effects for each of the IVs and their interactions after the main MANOVA stats as a kind of post hoc. I thought these tests we...
I am trying to program a pathway analysis. Briefly, I have a list of genes which contain 1 or more mutations. I have mapped these genes to pathways, and I want find out if any pathways are over-represented in these mappings. My approach is permutation based: I randomly place an equivalent number of mutations within the...
I'm new to forecasting using neural networks. I have decided to use feedforward backpropagation algorithm. What are the input values if I have past data and what is the technique to select input values?
Is there a way to use the factor scores from one dataset to "partial out" the effects from another dataset which has the same variables? Basically I have two datasets: healthy people and sick people. I'd run factor analysis on the healthy set (called "base"), restricting to only one factor so that it acts like a summar...
In an article, I recently came across the mention of first and second order U-type statistics without further detail. Does anyone know what U-type statistics are? References will be highly appreciated.
This wikipedia link lists a number of techniques to detect OLS residuals heteroscedasticity. I would like to learn which hands-on technique is more efficient in detecting regions affected by heteroscedasticity. For example, here the central region in the OLS 'Residuals vs Fitted' plot seen to have higher variance than ...
I've found how to measure the smoothness of a time series in R from this previous CV question, and I think I understand it, but I don't have access to R, only to Excel. How would I calculate this? Given this formula for a normalized version of smoothness: sd(diff(x))/abs(mean(diff(x))) How do I calculate the diff() po...
I've fitted a lognormal model using R with a set of data. The resulting parameters were: meanlog = 4.2991610 sdlog = 0.5511349 I'd like to transfer this model to Scipy, which I've never used before. Using Scipy, I was able to get a shape and scale of 1 and 3.1626716539637488e+90 -- very different numbers. I've also t...
Lets say I have a linear regression: $$y \sim 1 + x_1+x_2$$ where the range of $x_2$ is $[0,10]$. I fit this model using lm or rlm with regression weights in R. I collect the residuals and plot them against $x_1$, I found that the residuals show a pattern with respect to the variable $x_1$. The $R^2$ of regressing the...
I have gone through the techniques and understood the basic ideas. But I want to know which one usually is expected to work better, LDA or Labeled LDA? What are the features of the dataset that help decide amongst the two?
For the last 3 weeks I have been reading books, papers and internet sources incl. cross validated but could not find something that would work in my case. I have data from a split-plot field trial. The field trail was laid out in the same way at 2 locations over 2 years. The literature said that it would be best to do ...
Possible Duplicate: Interpreting main effect and interaction In a GLM, I had one categorical predictor and one covariate. To ensure the covariate was consistent across levels of my predictor I included an interaction term. This was non significant. Am I then justified in removing it from the model? My categorical pr...
I want to build a neural network, but because I have high resolution pictures, I rejected the idea of passing the entire image to the NN. I was wondering what are the most common extracted features for use as input to the NN. I know that features depends on the kind of images. But I guess I'm wondering what are the s...
I'm trying to estimate the growth rates of a number of ant colonies. I have measured colony mass at three different time points. I was thinking about measuring growth rate by fitting an exponential growth model to each colony's masses across time. It was drawn to my attention that I may not be able to perform non-linea...
I'm working with two independent normal distributions $X$ and $Y$, with means $\mu_x$ and $\mu_y$ and variances $\sigma^2_x$ and $\sigma^2_y$. I'm interested in the distribution of their ratio $Z=X/Y$. Neither $X$ nor $Y$ has a mean of zero, so $Z$ is not distributed as a Cauchy. I need to find the CDF of $Z$, and th...
I'm a biologist, and I have a large dataset that I'm trying to analyze. Here are the variables I'm working with: levels of 211 different metabolites in 16 different blood samples (predictor variables) how well each of the 16 blood samples performed in a specific test (response variable) I am trying to figure out whic...
I have the following set of results for one of the factors (birth weight) with different levels and their corresponding Odds ratios for survival. I am using the first level (<1.25) as the reference level: Birth weight (kg): Levels Number/level Odds Ratio <1.25 1615 1.00 1.25-1.46 1617 ...
Suppose that $X$ and $Y$ are iid normally distributed and $a$ is a scalar. What is $\Pr(Y+aX<0 | X>0)$?
I am testing an interaction effect where $X$ and $Y$ are continuous variable and $M$ (Moderator) is a categorical variable (effects coding $+1$, $-1$). I have no clue about how to do a post-hoc probing of slopes in this case. For a continuous moderator we calculate $Z_{\rm above}$ and $Z_{\rm low}$, calculate their cr...
Consider Jaynes' solution to the Bertrand paradox using the principle of indifference. Why doesn't a similar argument apply to the Borel-Kolmogorov paradox? Is there something wrong with arguing that since the problem does not specify an orientation for the sphere, rotating the sphere should not affect the resulting di...
Say we have N voters from some group (N binomial variables). Each voter has a preference on voting about some issue (probability of "success" p), which depends on the preferences of other voters. Given a sample of votes for each voter (an estimation of their preference on that issue), and an estimation of the correlat...
I am using a GAM in R to compare time series data from 3 countries. The data sets are of hourly measurements for one year. The main aim here is to show when at which time of the day and day of the year are the data well matched to the mean series. The script below shows my attempt: ## Ozone measurements for three count...
I'm new proportional hazard ratio models and new-ish to R, so I suspect this is a basic question: The scenario is modeling the speed of an effect through hazard ratios. People are joining an organization, and most are invited by someone else within the organization*. The speed measured is the time between when the invi...
Consider the context of a dendrogram clustering. Let us call original dissimilarities the distances between the individuals. After constructing the dendrogram we define the cophenetic dissimilarity between two individuals as the distance between the clusters to which these individuals belong. Some people consider tha...
I have 21 socio-economic and attitudinal macro-level variables (such as percentage of mothers aged 24-54 not employed, percentage of children aged 3-5 in nursery schools and so on). I also have data on the proportions of grandparents which provided intensive childcare. Most of the socio-economic variables which I selec...
I'm dealing with a supervised binary classification issue. I'd like to use the GBM package to classify individuals as uninfected/infected. I have 15 times more uninfected than infected individuals. I was wondering if GBM models suffer in the case of imbalanced class sizes? I didn't find any references answering this qu...
I have an online k-means algorithm following this scheme: Let x a new data-point, and c the nearest cluster center if( distance(x, c) > threshold ) x becomes a new cluster center else assign x to c In order to speed up the search for nearest center, is it possible to have a hierarchical structuring of centers, that...
I have a set of data that is not ordered in any particular way but when plotted clearly has two distinct trends. A simple linear regression would not really be adequate here because of the clear distinction between the two series. Is there a simple way to get the two independent linear trendlines? For the record I'm us...
I'm using the nnet package in R to attempt to build an ANN to predict real estate prices for condos (personal project). I am new to this and don't have a math background so please bare with me. I have input variables that are both binary and continuous. For example some binary variables which were originally yes/no wer...
We want to select one out of a given set of (continuous) functions that best matches a set of observations $\{(s_i,c_i) \mid 1 \leq i \leq N\} \subseteq\mathbb{N} \times \mathbb{N}$ (input size and counter) of unknown distribution. We have many observed counters per size¹. So far, we have used least-square fitting on t...
I am looking at the probability of opting into a program based on a continuous variables $X_1$, $X_2$, $X_3$, etc. When I divide the sample into people who opted in and did not opt in and do a t-test I find that the mean of all the $X$'s for those opting in is significantly different from the mean for those not opting...
If I were to use Spearman's rho as a measure of correlation, must the data I'm working with be normally distributed/homoscedastic? Also, if I am plotting the data against time, must the data be time-independent?
I am currently running a multiple regression model using imputed data and have a few questions. Background: Using SPSS 18. My data appears to be MAR. Listwise deletion of cases leaves me with only 92 cases, multiple imputation leaves 153 cases for analysis. All assumptions met - one variable log transformed. 9 IV's 5 ...
I'm working with a survey that uses a rolling data collection format (i.e., there are multiple waves of sampling and initial contacts). I'm trying to develop a model to predict how likely a sample member is to respond to the survey within 7 weeks from today. Predicting whether a respondent who is first contacted today ...
Suppose we have $p$ dimensional vectors $Y_i$ which we model with $f_Y (y |\theta) = \sum \pi_k N(y | \mu_k, \Sigma_k)$ with $\theta$ being a catch all for the model parameters (the number of components might be a finite known/unknown number or infinite as in Dirichlet process mixtures). The prior on $\pi$ will either ...
Suppose I have a Netflix-style recommendation matrix, and I want to build a model that predicts potential future movie ratings for a given user. Using Simon Funk's approach, one would use stochastic gradient descent to minimize the Frobenius norm between the full matrix and the item-by-item * user-by-user matrix combin...
Given a set of extracted data from different sources with different accuracies, how can I combine the accuracy of those who give the same output? Example : Data from source A are 80% correct Data from source B are 85% correct Data from source C are 90% correct If two of the sources give the same result (ResultA) and t...
I'm working on an ongoing data analysis project about a series of live educational seminars. Each of my data points represents one such event, and for each one I have a multitude of categorical variables, as well as a couple quantitative ones that are my desired response variables (total revenue and number of attendees...
I've fit a mixed linear model to some longitudinal data. I'm interested in the differences in patterns of decrease in the dependent variable according to group status, and my hypothesis particularly predicts a difference between the groups in trajectory of change at between specific ages. The data shows a significant i...
I got the data, and plot the distribution of the data, and use the qqnorm function, but is seems doesn't follow a normal distribution, so which distribution should I use to discribe the data? Empirical cumulative distribution function
Actually, I am trying to learn a model using stochastic gradient descent. I am using just a small subset of my entire data at a time to make each iteration. As far as I know, stochastic gradient descent can fluctuate but still moves towards the maximum point. I am outputting the value of the objective function and I c...
I'm comparing 2 data sets from nearby locations to see if they differ significantly in air quality. I cannot perform any paired tests because the data at one location does not necessarily correspond to the data at the other location in time (i.e. one sample at location A was taken from Monday to Friday, another sample ...
I have a dataset {x_i} which form 3-10 clusters. Is there any analytical function of {x_i} that I may use to estimate the number of clusters in the dataset? The fact that there might be 3-10 clusters is actually the domain knowledge I have for my problem.
I have the following question, any hint would be really welcome: I am trying to conduct a two-country comparison by running two separate regressions, one for each country, and testing $H_0:\,b_1=b_2$ (using Wald tests), where $b_1$ is the coefficient of an explanatory variable in regression group 1 and $b_2$ is the coe...
Please note that I also posted this same question in an SPSS specific forum, however if anyone here can also help, I would appreciate it. I have a question regarding repeating time-to-events measurements and after a quick search I really did not find anything that directly answered my question. So here goes... Context ...
I have several groups of data for time series analysis, and I need some automatic way to do the analysis. I try to find a way in SAS to automatically do the job, but I can't find one corresponding to auto.arima() in R. I have two questions regarding this: The closest one is to use identify with scan and esacf to find...
Hello to all the biostatisticians and epidemiologists out there, I have looked up and down for a standard definition of recurrence-free survival, and the issue I'm having is determining if the standard includes DEATH as an event or not. I have seen some studies censor at death and others include death along with recur...
Suppose we have two independent Poisson-distributed variables $X_1$ and $X_2$. We want to test whether the Poisson parameters are equal, i.e. whether $\lambda_1=\lambda_2$. Now we have 4 distinct statistical exact tests to choose: E-test (see Krishnamoorthy and Thomson, A more powerful test for comparing two Poisson ...
Actually, I wanted to ask you how can I define the terminating condition for gradient descent. Can I stop it based upon the number of iterations, i.e. considering parameter values for, say, 100 iterations? Or should I wait such that the different in the two parameters values 'new' and 'old' is very small to the order ...
I have a sample including all students within 52 schools which have been randomly assigned to be treatment or control (we have group randomized trial in which all students in each school is either assigned to treatment or to control ). I'd like to know whether there is any school clustering effect in this data. In othe...
In Collaborative filtering, we have values that are not filled in. Suppose a user did not watch a movie then we have to put an 'na' in there. If I am going to take an SVD of this matrix, then I have to put some number in there - say 0. Now if I factorize the matrix, I have a method to find similar users (by finding out...
So I am trying to further understand Lift and Gain charts as it applies to my employee turnover model (i.e. used CHAID in SPSS Modeler). For my data this means predicting number of people voluntarily leaving the company. I have reviewed the below references and have the basics down regarding interpretation: what is p...
I have a few variables, $A$, $B$, $C$, $D$, and $E$. To find their cointegration coefficients, $A$ is regressed against $B$, $C$, $D$, and $E$. $$ A = W_b * B + W_c * C + W_d * D + W_e * E + W0 $$ (where $W_b$, $W_c$, $W_d$, $W_e$ are cointegration coefficients and $W_0$ is intercept). The residuals are then tested for...
I have a dataset (data.mrsa) about the MRSA prevalence of elderly in long term care facilities (LTCF) with the following information: mrsa_result: MRSA result of recruited elderly (positive VS negative) age: residents' age ltcf: UID for each LTCF (we sampled 30 out of 1000 LTCFs) ltcf_type: type of LTCF (private VS no...
I have two distinct data samples($A$ and $B$), and to each one a gaussian is fitted. I then evaluate the product $S = \sigma_A * \sigma_B$ ($\sigma_A$ and $\sigma_B$ and their errors are obtained from fit procedure). If I assume $\sigma_A$ and $\sigma_B$ are uncorrelated, I can easily propagated the error on the p...
I am using R to fit a linear model. My code is: rating_lm <- lm(rating\$flow ~ I(rating\$raw^2) + rating\$raw, data = rating, weights = 1/(rating\$flow) I then use the following code to get prediction intervals: b <- predict(rating_lm, interval = "prediction") The graph below shows: the fitted line (red line), the ...
I have a sample of 48. According to the central limit theorem, I may consider means of every continuous variable in my sample to have a normal distribution. However, one variable has a mean of 14 +/- 8 and when I draw a normal quantile plot, it seems to not be a normal distribution. If I use a t-test to compare this va...
I came across the following statement $cov(E(\mathbf{z}|y))$ is degenerate in all direction orthogonal to $Span(\mathbf{x}_1, ...,\mathbf{x}_K)$ Vector $\mathbf{z}$ is a centred random vector of size $p$, $y$ is a scalar random variable and the $\mathbf{x}_k$ are $K$ vectors of size $p$. Does it mean that any vector ...
I am observing strange patterns in residuals for my data: [EDIT] Here are the partial regression plots for the two variables: [EDIT2] Added the PP Plot The distribution seems to be doing fine (see below) but I have no clue where this straight line might be coming from. Any ideas? [UPDATE 31.07] It turns out you w...
In my experiment participants had to make a binary (yes-no) decision about various stimuli. I have two categorical (stimulus characteristics coded as -1 0 and 1 and treatment group coded as 0 1) and three continuous (questionnaire scores) variables. After useful feedback on a previous question of mine, Difference betw...
I am writing a program and would be interested in knowing how much faster does a version run compared to another. For that, I wrote a benchmark script that times the run time of my program, repeats the process multiple times and computes the average of the results. Let's say I run it on the version 1 of my program, I g...
I'm failing to understand the value of the intercept value in a multiple linear regression with categorical values. Taking the "warpbreaks" data set as an example, when I do: > lm(breaks ~ wool, data=warpbreaks) Call: lm(formula = breaks ~ wool, data = warpbreaks) Coefficients: (Intercept) woolB 31.037 ...
I am running stats on $5$ IVs ($5$ personality traits, extroversion, agreeableness, conscientiousness, neuroticism, openness) against $3$ DVs Attitude to PCT, Attitude to CBT, Attitude to PCT vs CBT. I also added in age and gender to see what other effects there are. I am testing to see whether personality traits can p...
I have a huge dataset (50,000 2000-dimensional sparse feature vectors). I want to cluster them in to k (unknown)clusters. As hierarchical clustering is very expensive in terms of time complexity (though it provides better result), I have designed my clustering framework as follows: do K-means clustering to partition t...
I am analyzing data in order to develop a model for power generation of a solar system based on three predictor variables. I have done t-tests showing significant improvement in the generation while varying one variable at a time. Each variable has only two possible values in my situation, and for each variable I have ...
I am using AIC (Akaike information criterion) for model selection. There are 2 models. The first model has 2 parameters with log likelihood of -10182.0284 and the second model has 3 parameters with the same likelihood when tried on a specific dataset that displays the need for only two parameters. The weighting I get w...
This seems to be so straightforward that I can't believe I haven't found the answer in the SPSS help or online - I must be missing something. I have two scale variables, let's call them $X$ and $Y$. They are likert scale variables measuring agreement with attitude statements for two items that are thought to measure th...
I've dealt with Naive Bayes classifier before. I've been reading about Multinomial Naive Bayes lately. Also Posterior Probability = (Prior * Likelihood)/(Evidence). The only prime difference (while programming these classifiers) I found between Naive Bayes & Multinomial Naive Bayes is that Multinomial Naive Bayes calcu...
This question is a follow-up to a prior question. Basically, I wanted to study under what conditions when we regress the residuals to $x_1$, we will get $\small R^2$ of 20%. As a first step to attack this problem, my question is, how do I express $\small R^2$ in matrix form? Then I will try to express "$\small R^2$ o...
If I do regression in two stages: Stage 1: $y\sim x_1 + 1$ Stage 2: resid_1st_stage $\sim x_2 + 1$ Will the resid_2nd_stage be orthogonal to $x_1$?