instruction
stringlengths
9
38.7k
I have a prospective study with no data about estimated results, that could be used to get required sample size. Data looks like this: caseID;groupID;value,result 1;1;12.3;0 2;1;15.6;1 3;2;11.3;0 4;2;13.4;1 ... Is it possible to determine how much observations should be made to complete the study after adding new por...
Is there a way to easily create factors based on quantiles of selected variables in a dataframe? Say, in a datatset D, I have variables V1 to V10, which are all numeric. I would like to create dummies for V7 to V10 based on their respective quantiles.
I have a few questions regarding multiple imputation for nested data. Context: I have repeated measures (4 times) from a survey and these are clustered in workplaces (205 workplaces). There are about 180 items on this survey. q1. Is it possible to take both the repeated measures and the workplace clustering into consi...
I work with a lot of bar charts. In particular, these bar charts are of basecalls along segments on the human genome. Each point along the x-axis is one of the four nitrogenous bases(A,C,T,G) that compose DNA and the y-axis is essentially how many times a base was able to be "called" (or recognized by a sequencer mach...
I need to create random vectors of real numbers a_i satisfying the following constraints: abs(a_i) < c_i; sum(a_i)< A; # sum of elements smaller than A sum(b_i * a_i) < B; # weighted sum is smaller than B aT*A*a < D # quadratic multiplication with A smaller than D where c_i, b_i, A, B, D are con...
Possible Duplicate: What is the difference between data mining, statistics, machine learning and AI? How to compare machine learning vs. data mining? data mining vs. statistical analysis? machine learning vs. statistical analysis?
I have 3,000 observations (administrative communities) characterized by five variables. Four of them work in the direction 'the more, the worse' and one goes in the opposite. I'd like to create one score or an ordered list of these observations that will best take into account all of those five variables. I have tried ...
Suppose I have two I(1) time series X and Y, and I want to know whether X and Y are "related" (for some definition of "related"). The standard cointegration approach defines relationship as cointegration, and says that X and Y are cointegrated if some linear combination of X and Y is stationary. To test whether X and Y...
The UN has a convention against corruption (UNCAC) that has been signed by some 140 countries and ratified by most (link). Transparency International publishes an annual report on corruption. They have data for most countries for the period 2000-2010, each country is given a score between zero and ten where ten is best...
I have a set of around 500 responses to a online survey that offered an incentive to complete. While most of the data appears to be valid, it's clear that some people were able to get around the (inadequate) browser cookie-based duplicate survey protection. Some respondents clearly randomly clicked through the survey t...
Building on the post How to efficiently manage a statistical analysis project and the ProjectTemplate package in R... Q: How do you build your statistical project directory structure when multiple languages feature heavily (e.g, R AND Splus)? Most of the discussions on this topic have been limited to projects which pr...
Given the prior probability of 2 distributions, $N(x,y)$ and $N(a,b)$, where $N(\mu,\sigma^2)$: How do you make a decision rule to minimize the probability of error, if the prior probabilities are equal? Can you give an example? What if the prior probabilities are different, such as $P(\text{Distribution 1}) = 0.70$ $P...
Does any body know how to run a post hoc comparison in a 2X2 ANOVA with covariate in R. multcomp package seems very nice but I could not find clear answer or example to my question with this package. Thanks so much in advance
Is it possible to use kernel principal component analysis (kPCA) for Latent Semantic Indexing (LSI) in the same way as PCA is used? I perform LSI in R using the prcomp PCA function and extract the features with highest loadings from the first $k$ components. By that I get the features describing the component best. I t...
It's well established that both Anderson-Darling and Shapiro-Wilk have a much higher power to detect departures from normality than a KS-Test. I have been told that Shapiro-Wilk is usually the best test to use if you want to test if a distribution is normal because it has one of the highest powers to detect lack of nor...
From basic statistics and hearing "correlation is not causation" all the time, I tend to think it's fine to say that "X and Y are correlated" even if X and Y aren't in a causal relationship. For example, I'd normally think it's perfectly okay to say that ice cream sales and swimsuit sales are correlated, since high swi...
I am a beginner in statistics. I have these unpublished data (cases and deaths) of a disease for 7 years (2004-2010) from 2 neighbouring states. The study was started in 2004. State 1 and State 2 received different treatments. The death rate is high in one State. I want to prove that treatment given in State 1 is super...
I want to test whether a correlation coefficient is greater than 0.5. What should the null and alternative hypothesis be? Should I do a two tailed test or one tailed test?
This is somewhat related to another question that I asked. The question I have is, when doing hypothesis testing, when the alternative hypothesis is a range, the null hypothesis is still a point value. As an example, when testing whether a correlation coefficient is greater than 0.5, the null hypothesis is "correlatio...
EDIT: I reduced my problem to a more specific question: https://math.stackexchange.com/questions/26573/ But I am still interested in other ideas. Let's say our data is generated by $$Y_i = f(X_i) + \epsilon_i$$ where $X_i$ are observed vectors, and $f$ is an unknown function. We know that $f$ is invariant with respect...
I have used factor analysis with regression method. I was trying to develop an index using this regression equation by using the output of the component score coefficient matrix (SPSS) generated for each factor. Should I include the residuals found under the "Reproduced Correlations Table" (SPSS) in the regression equa...
I need to build a boxplot without any axes and add it to the current plot (ROC curve), but I need to add more text information to the boxplot: the labels for min and max. Current line of code is below (current graph also). Thanks a lot for assistance. boxplot(data, horizontal = TRUE, range = 0, axes=FALSE, col = "grey"...
For some volume reconstruction algorithm I'm working on, I need to detect an arbitrary number of circular patterns in 3d point data (coming from a LIDAR device). The patterns can be arbitrarily oriented in space, and be assumed to lie (although not perfectly) in thin 2d planes. Here is an example with two circles in th...
I'd like to perform semi-supervised LDA (Latent Dirichlet Allocation) in the following sense: I have several topics that I'd like to use, and have seed documents that relate to these topics. I'd like to run LDA to classify other documents, and potentially discover other topics. I would guess there is work done on that,...
I have been looking for computer game datasets, but so far I've only been able to find the 'Avatar History' dataset for WoW. Are there any other interesting datasets out there, possibly for other genres?
I have R data frame like this: age group 1 23.0883 1 2 25.8344 1 3 29.4648 1 4 32.7858 2 5 33.6372 1 6 34.9350 1 7 35.2115 2 8 35.2115 2 9 35.2115 2 10 36.7803 1 ... I need to get data frame in the following form: group mean sd 1 34.5 5.6 2...
I'm trying to figure out the usage of the $\chi^2$ distribution. In other words, in what kind of situations it occurs and how is it useful in that situations. I read the wikipedia definition of $\chi^2$. Can someone give an example of a $\chi^2$ distribution so that I can better understand it?
I have a dataset of events that happened during the same period of time. Each event has a type (there are few different types, less then ten) and a location, represented as a 2D point. I would like to check if there is any correlation between types of events, or between the type and the location. For example, maybe eve...
I'm trying to understand the logic behind the ANOVA F-test in Simple Linear Regression Analysis. The question I have is like follows. When the F value, i.e. MSR/MSE is large we accept the model as significant. What is the logic behind this?
I have just discovered, through this answer, a nice video resource to share with students in introductory statistics courses. The lectures, produced by the Khan Academy, are fairly didactic and well illustrated. I could not find the author of the videos. Is there another set of video courses which I could recommend to ...
I have N uniform-random points $p_j$ in a box in $E^d$, $a_i \le x_i \le b_i$, and want to estimate the expected distance of the point nearest the origin in $L_q$: $\quad$ nearest( points $p_j$, box $a_i .. b_i$, $q$ ) $\;\equiv\;$ $\min_{j=1..N}$ $\sum_{i=1..d}$ |$p_{ji}|^q$ The box might straddle 0 in some dimension...
I would like to use R to plot out something like this: It would seem possible but highly complex to keep track of the coordinates, width, height, etc. Intuitively it would seem best to treat each cell as a new plot and transform the coordinates for each cell. Is there a way to do this in R? thanks!
I need to find partial derivatives for: $L=\frac{1}{2}\sum_{i=1}^{n} w_{i}^{2}\sigma_{i}^{2} -\lambda \left( \sum_{i=1}^{n} w_{i} \bar{r_{i}} - \bar{r} \right) -\mu \left( \sum_{i=1}^{n} w_{i}-1 \right)$ with 5 variables, I get 5 partial derivatives $\frac{\partial L}{\partial w_{1}}$, $\frac{\partial L}{\partial w_{2}...
I am evaluating a Quadratic Discriminant Analysis (QDA) classifier on a high-dimensionality feature set. The features come from highly non-Gaussian distributions. However, when I transform the features to each have a Gaussian distribution in two different ways, the resulting classifiers performs worse than QDA applie...
In a paper I was reading recently I came across the following bit in their data analysis section: The data table was then split into tissues and cell lines, and the two subtables were separately median polished (the rows and columns were iteratively adjusted to have median 0) before being rejoined into a single table...
Lets say I am regressing Y on X1 and X2, where X1 is a numeric variable and X2 is a factor with four levels (A:D). Is there any way to write the linear regression function lm(Y ~ X1 + as.factor(X2)) so that I can choose a particular level of X2 -- say, B -- as the baseline?
I've known that, in orthogonal rotation, if the rotation matrix has determinant of -1 then reflection is present. Otherwise the determinant is +1 and we have pure rotation. May I extend this "sign-of-determinant" rule for non-orthogonal rotations? Such as orthogonal-into-oblique axes or oblique-into-orthogonal axes rot...
If $X$ is a $m × n$ matrix, where $m$ is the number of measurement types (variables) and $n$ is the number of samples, would it be correct to perform a PCA on a matrix that has $m \geq n$ ? If not, please provide some arguments why would this be a problem. I remember having heard that doing such an analysis would be in...
I have a lot of data on previous race history and I'm trying to predict a percentage chance of winning the next race using Regression, kNN, and SVM learning algorithms. Say a race has 5 runners, and each runner has a previous best course time of, say $T_i$ (seconds). I've also introduced an additional input for RANK of...
In R, I am trying to write a function to subset and exclude observations in a data frame based on three variables. My data looks something like this: data.frame': 43 obs. of 8 variables: $ V1: chr "ENSG00000008438" "ENSG00000048462" "ENSG00000006075" "ENSG00000049130" ... $ V2: chr "ENST00000008938" "ENST00...
I wanted to carry out a two-way ANCOVA for my data. However, SPSS isn't liking that I have only one IV. I have One IV: Group (3 levels, i.e. 2 experimental groups and a control group), One DV: outcome measure (2 levels, i.e. time 1 and time 2), One covariate (I have checked and this demographic continuous variable m...
I got asked something similar to this in interview today. The interviewer wanted to know what is the probability that an at-the-money option will end up in-the-money when volatility tends to infinity. I said 0% because the normal distributions that underly the Black-Scholes model and the random walk hypothesis will hav...
The two main packages I use at work are Palisade Risk and SPSS Clementine - they are both quite old versions and I've been supplementing the ability to analyze properly at work with more modern abilities available at home. E .g.at home I've been testing RapidMiner 5, which I really like in principle but have experience...
I am planning a study to collect data of patients dying after brain infection versus number of cases for the next 5 years in 2 cities where they manage the disease with different drugs. Will a year wise t-test be better or year wise Relative Risk of death and meta analysis be better to compare the results of the study...
The two-sample Kolmogorov-Smirnov statistic is normally defined as $D = \max_x |A(x) - B(x)|.$ I would like to compute a variant that retains the sign of the difference between the distribution functions: $D^\prime = A(x) - B(x) \quad\text{where}\quad x = \arg\max_x |A(x) - B(x)|.$ What is the right name of $D^\prime$?...
I know that Mclust does the fit on its own but I am trying to implement an optimization with the aim to generate a mixture of 2 gaussians with the combine moments as closed as possible to the moment of my returns' distribution. The objective is to Min Abs((Mean Ret - MeanFit)/Mean Fit) + Abs((Std Ret -Stdev Fit)/Stde...
I am a novice when it comes to stats, so I apologize beforehand for the simplicity of my question. I trying to figure out the best way to normalize (this may be the wrong term) my data in so that the maximum value is 1 and the minimum value is 0. What are my options and what methods would you suggest as the best? My da...
I have this dataset with size (rows) and shape (columns) and in each cell #disease/#in cell . How would I answer the following questions? Is size an indicator of disease? Is shape an indicator of disease? Is there a size*shape effect? Size shapea shapeb shapec %a %b %c <4 mm ...
I have data in this format: Words,Source,Result pestology Gomel, cheap, 0 cocreating, cheap, 1 munitioner impersonating nonextinct, cheap, 1 Kolomna, expensive, 1 Enyo's snakemouth, expensive, 0 blueberries backare farriers, cheap, 0 markets rafales, cheap, 0 ... http://bit.ly/h2ynoG How should I determine whether th...
Stata allows estimating clustered standard errors in models with fixed effects but not in models random effects? Why is this? By clustered standard errors, I mean clustering as done by stata's cluster command (and as advocated in Bertrand, Duflo and Mullainathan). By fixed effects and random effects, I mean varying-in...
I have got a strange problem with using functions which are supposed to be in the libraries lmtest & language R (downloaded from cran.r-project recently), namely lrtest() and pvals.fnc() - however, they are not available. I have upgraded my R-version to 2.12.2 but it has not solved the problem. library(lmtest) lrtest()...
I am looking for a self-study site on the web that will allow me to verify my understanding of some basic probability and stats concepts and operations. What I would like is a site with data and problems (along with the solutions) that I could use to practice my skills (such as regression methods/analysis, pairwise t-t...
While trying to make sense of MDL and stochastic complexity, I found this previous question: Measures of model complexity, in which Yaroslav Bulatov defines model complexity as "how hard it is to learn from limited data." It is not clear to me how Minimal Description Length (MDL) measures this. What I am looking for i...
I am investigating the effect of a drug on EEG and cognition in epilepsy patients. We have done EEG and neuropsychological (NP) tests twice, before and after medical treatment. Some of parameters in EEG and NP tests were significantly altered after drug treatment (done by Wilcoxon rank sum test, as the distribution was...
I am fitting a binomial family glm in R, and I have a whole troupe of explanatory variables, and I need to find the best (R-squared as a measure is fine). Short of writing a script to loop through random different combinations of the explanatory variables and then recording which performs the best, I really don't know ...
As title, is there anything like this? I know how to calculate CI for arithmetic mean, but how about geometric mean? Thanks.
Let A be $n \times p$ matrix of independent variables and B be the corresponding $n \times 1$ matrix of the dependent values. In ridge regression, we define a parameter $\lambda$ so that: $\beta=(A^\mathrm{T}A+\lambda I)^{-1}A^\mathrm{T}B$ . Now let [u s v]=svd(A) and $d_{i}=i^{th}$ diagonal entry of 's'. we define de...
I assume a simple model $\log(y_i) \sim \mathcal{N}(\mu_i,\sigma)$ with $\mu_i=\alpha + \beta x_i$ . Now if I have the estimates $\hat{\alpha}$ and $\hat{\beta}$, how do I calculate the fitted values $\hat{y}$? (Using $\hat{y}= \exp(\hat{\alpha} + \hat{\beta} x_i)$ seems to work; this would be the median of the log-nor...
One of the predictors in my logistic model has been log transformed. How do you interpret the estimated coefficient of the log transformed predictor and how do you calculate the impact of that predictor on the odds ratio?
In multiple linear regression, let us say that the F test shows that the model is significant. But the t-tests for beta values does not say that the beta values are non-zero. What can we conclude in such a situation? Does the fact that the tests for the beta values failed affect the fact that the model is significant?
I'm trying to implement an EM algorithm for the following factor analysis model; $$W_j = \mu+B a_j+e_j \quad\text{for}\quad j=1,\ldots,n$$ where $W_j$ is p-dimensional random vector, $a_j$ is a q-dimensional vector of latent variables and $B$ is a pxq matrix of parameters. As a result of other assumptions used for the ...
I have a multiple response (categories) question (Q11, ..., Q15). My problem is that the data-entry clerck repeats the answers in the same case. Example: Q11 Q12 Q13 Q14 Q15 Case 1 001 003 015 001 022 (001 was type twice) Case 2 089 032 089 089 014 (089 was typed three times) I need to find a way to identified...
I am trying to set up an automatic screen to detect structural breaks in large numbers of time series. The time series are weekly and represent behaviour of customers. I have set up a Chow test. I use the most recent 4 weeks and compare it to the preceding 22. I want to know if their recent behaviour has significantl...
I am a beginner in statistics and poor in mathematics. I am trying to to assess effect of intervention in one state versus another using annual data. My data are State 1 State 2 Cases Deaths Cases Deaths 2004 1125 5 2024 254 2005 1213 5 1978 209 2006 1003 4 2294 217 2007 ...
I'm looking at binomial data where I believe that the probability of the outcome is the product of two independent factors. If you think of it as a two step decision, At the first step, there is a certain probability $p$ that you will have a success, and $1-p$ that you will have a failure. If you have a failure at th...
Update: I wanted to clarify that this is a simulation. Sorry if I confused everyone. I have also used meaningful names for my variables. I am not a statistician so please correct me if I make a blunder in explaining what I want. In regard to my previous question, I have reproduced parts of my question here for referenc...
I have a three level contingency table, with count data for several species, the host plant from which they were collected and whether that collection happened on a rainy day (this actually matters!). Using R, fake data might be something like this: count <- rpois(8, 10) species <- rep(c("a", "b"), 4) host <- r...
I am trying to understand how influence functions work. Could someone explain in the context of a simple OLS regression \begin{equation} y_i = \alpha + \beta \cdot x_i + \varepsilon_i \end{equation} where I want the influence function for $\beta$.
While attending conferences, there has been a bit of a push by advocates of Bayesian statistics for assessing the results of experiments. It is vaunted as both more sensitive, appropriate, and selective towards genuine findings (fewer false positives) than frequentist statistics. I have explored the topic somewhat, an...
I'm a complete noob when it comes to statistics, so please excuse my lack of standard terminology. I think my question might be related to normalization, but please re-tag if I'm wrong. I'm a programmer by trade, and I've been tasked with creating a chart which shows how the number of errors in a data set change from ...
I have a quarterly time series and test for stationarity with an augmented Dickey-Fuller test using R. adf.test(myseries) # returns # Dickey-Fuller = -3.9828, Lag order = 4, p-value = 0.01272 # alternative hypothesis: stationary so the H0 is rejected. I tried to validate this intuitively and regressed the same series...
I would like to analyse the following type of experiment using a two-level fully nested ANOVA. We have mice of two genotypes (Group factor) and for each of the genotypes we take a certain number of mice (sub-groups) and measure several identical samples per each mouse. Thus it looks like a classic two-level nested desi...
I am a beginner in statistics with just basic knowledge. I have these data: cases, deaths and CFR (Case Fatality Rate-deaths per 100 cases) of a disease for 17 years (1994-2010) from 2 neighbouring states where people can walk across the states freely. This is a population based cohort study. Data are available from 19...
I have a matrix of positive real numbers between 0 and 1; the rows represent genes and columns represent samples. Number of rows is greater than the number of columns by a magnitude of $10^4$. I am wondering how to visualize this in R. I know heatmap is one of the ways to do this, but are there other ideas. Here are a ...
French polling institutes are currently facing a major crisis after they recently published what can only be called the most ridiculous poll so far on the 2012 presidential election horse race. The French Senate is now considering to legislate on the issue by forcing polling institutes to publish, among other things, t...
I am seeing a regression model which is regressing Year-on-Year stock index returns on lagged (12 months) Year-on-Year returns of the same stock index, credit spread (difference between monthly mean of risk-free bonds and corporate bond yields), YoY Inflation rate and YoY index of industrial production. It looks thus (...
I am trying to correlate age (6-90 yrs) with loudness of voice (in dB). However, my data do not contain any data points in the range of 20-50 yrs. What correlation measure is most appropriate with such a considerable gap, and why? I have been using Kendall Tau so far. Note that we are not dealing with bimodally distri...
I am looking to build a predictive model for predicting churn and looking to use a discrete time survival model fitted to a person-period training dataset (one row for each customer and discrete period they were at risk, with an indicator for event – equaling 1 if the churn happened in that period, else 0). I am fitt...
I am a first year psychology student. I am doing some research work with a prof, unfortunately the material that I need to use right now is covered only in my second year. But I need to already know it now. So I am burning through any resources I can find to quickly come up to speed. I need help to understand this part...
I want to build a linear model to predict a scalar output from a vector of noisy scalar variable measurements. I have two separate training data sets. One has output data and corresponding exact variable measurements. The other has exact variable measurements and corresponding noisy variable measurements. The noisy ...
So I have data that has been quantized by an analogue to digital converter. (continuous data has been turned into discrete data and the values range from 0 to the saturation value , which is 127 in this case). This particular instrument I used to gather the data is quite noisy, let's say there is added Gaussian noise...
I need a closed-form expression for the probability that 2 values drawn at random from a normal distribution are separated by at most T, as a function of T and the variance of the distribution. I can formulate the problem as an integration, but can't solve it. I'd be happy with a well-motivated approximation. I'd be am...
I have logs of which users run which programs on our systems at a university. The data shows username, process time, and the time stamp for the sample. I also know which classes each user is in. Given this data, is it possible to reliably tell which professors/courses use a particular piece of software? I figure this m...
I have three questions. I want to conduct a planned comparison in ANCOVA which compares three groups (n=2, n=7 and n=5) with two groups (n=11 and n=25). Is it ok to include the group with n=2 if I am only conducting a planned comparison as described above? Is it ok to conduct an ANCOVA when I am only comparing two gro...
I do not know why package forecast 2.16 in R does not produce Theil's U? I really appreciate your efforts.
I posted this question on Electronics.Stackexchange and someone told me I'll be better off posting it here. Its an implementation of the Particle Filter using MATLAB but the results never follow the observations. I changed the weighting function to be Gaussian but still no avail. NOTE: I haven't taken into account th...
I am working on a research project that is related to optimization and recently had an idea to use MCMC in this setting. Unfortunately, I am fairly new to MCMC methods so I had several questions. I'll start by describing the problem and then asking my questions. Our problem boils down to estimating the expected value o...
I have continuous data $A$ and categorical data $O$. I need counts of $A$ in bins by group $O$. I'm working in R. I know how to bin data (using cut2) and how to get the counts of $O$ (using aggregate or by or describe or summaryBy). I could also get what I need by running one of these functions with a subset (bin) of t...
I would like to import the "Last Trade" stock price from Yahoo finance into R. The intention is to work with (almost) real time data. Are there any solutions? Thanks in advance for any helpful comment.
I have a time series, let's call it $y(t)$. Augmented Dickey-Fuller and Phillips-Perron tests indicate no unit root but a deterministic trend. The series is strongly autocorrelated. I estimated the following short-run dynamic model: $$y(t) = \alpha + \beta\cdot y(t-1) + \gamma\cdot t + \varepsilon_t$$ where $\alpha$, ...
I have a dataset with repeated measures at different speeds. I've binned the speed ranges into 0-0.5, 0.5-1.5, and 1.5-infinity. mydata`$`fact<−cut(mydata$section, breaks=c(0,0.5,1.5,Inf)) which gives the levels (0,0.5] (0.5,1.5] (1.5,Inf] I first used the lme to test all speeds together to see if x and y are spee...
Supposing a Bayesian classifier with multivariate normal densities, how do I find the error rate of the classifier when we have two classes? I am using this: When dimension $d = 1$: $$P(x | \mu , \sigma^2) = N(x, \mu, \sigma^2) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} $$ In $d$ dimensions: $$P(...
Other then gapminder.org, could you please direct me to any good examples (interactive or static) of visualizations that compare between countries?
I hope this is an appropriate forum for this question...if not, any pointers on a place to ask would be great. If my questions is not clear, please just let me know and I'll try to add information/explanation where I can. Say I have a set of data points that I run through a FLAME clustering algorithm, and I get my set...
I am finishing up some analysis on a large set of data. I would like to take the linear model used in the first part of the work and re-fit it using an linear mixed model (LME). The LME would be very similar with the exception that one of the variables used in the model would be used as a random effect. This data comes...
I have data on 70,000 students, nested in 120 schools. I'm starting with fixed effects for the schools, but at some point I might start letting intercepts and slopes vary. Some key predictors (e.g. gpa, test scores) have non-linear relationships with some outcomes. I definitely want to interact these predictors wit...
When to use multivariate logistic regression versus generalized linear mixed-effects models? What is the difference between the two? Edit (in response to comments): I was hoping to see multivariate as more than one covariate. My problemset is analysis for a longitudinal prospective cohort study where im measuring vita...
I have some data; it's a proportion $y$ of some stuff relative to everything, so it's bounded between 0 and 1 by definition. The proportion changes over time. Besides fairly high variance there is a step-like change about the middle of the time period; the step isn't very large, but it's there, and it happens pretty f...
I would like to validate a commonly used questionnaire for internet-based administration. What statistical tests should I be using?
My goal is to create CI for the CART prediction of new_x Consider the following code: require(rpart) set.seed(147830) n <- 100 x1 <- runif(n) x2 <- rnorm(n) y <- x1 + 2*x2 + rnorm(n, 0, .5) DAT <- data.frame(y,x1,x2) fit <- rpart(y ~ x1 + x2, data = DAT) new_x <- data.frame(x1 = .5 , x2 = .25) predict(fit, newdata ...