# Tagged Questions

24 views

### Analyzing within subjects time-limited factors

I have 2 x 2 x 2 mixed design with two between subject factors (sex, organizer) and one within subjects factor (task). The last factor has values for task 1 and task 2. Both tasks were timelimited, 3 ...
47 views

### Nonlinear regression: best transformation when getting very different parameter estimates

Disclaimer: Statistics is not my strong side, so if my question is nonsense I apologize. I'm a beginner, but really wanting to understand this. My question is: why do I get so widely different ...
7 views

### R: Replace 0 in one data set with values from another [migrated]

I have data that has produced $0$ for the $User$ $Rating$ when the regression fails to converge. I want to replace these $0$ with the $User$ $Mean$ value that's in a different matrix. I have the ...
62 views

### How to adjust measured values depending on control values?

I have taken 20 photographs. Each photograph contained a museum specimen of a bird and a colour chart. In each photograph, I measured the brightness of a specific part of the bird's plumage and the ...
72 views

### data-transformation for multi-state analysis using traminer/mstate

I am trying to estimate a multi-state model and am following the setup in the book by Mills (2011). The research units can go through different states a, b, c, and d. The research units can move ...
44 views

51 views

### How to reshape a variable to, say, mean = 5, sd = 10? [duplicate]

The problem I am having is that I have a distribution that I want to remain the same shape, but the mean and variance altered. When I use scale() in R, it can ...
79 views

### Dealing with grouped / rounded data

I have a dataset that includes variables about customer income levels. The income was collected in binned fashion (...
110 views

### Bounded response variable [-1;1] - Should I transform it?

I am planning to use two response variables. One is bounded between 0 and 1, and I guess I can use a binomial (or related) error structure. The second variable is bounded between -1 and 1. I am not ...
103 views

### “system is exactly singular” in R function BoxCox.ar

I'm trying to perform a Box-Cox transformation on some financial data (SPY). The BoxCox.ar function (in the package TSA) gives me the following error: ...
189 views

### What are my choices for transforming data that are not normally distributed?

I have two sets of data comparing two variables: x and y. I'd like to transform and compare both sets either in r or matlab. ...
104 views

### Is there a more elegent solution for exponentially weighted-mean in R? [closed]

OK so I have a working code to do what I want but I am new to R and feel like my solution is very clunky and there is likely a more efficient way to get the same result. I have a set of data that ...
183 views

### Can multinomial regression do what I want?

I have a list of observations of females and their responses, categorized into 5 behaviors, to a potential threat. I'm wondering if, for each response type, whether the presence of an infant makes it ...
46 views

### Question on re-indexing data for graphing

A file contains data for 1975-2012 of housing prices across a panel of countries. However, it's indexed to 2005, so each country's housing price series converges to 100 in 2005, then they spread ...
156 views

### Procedure to select transformation on linear regression

I need to automate the transformation on some linear regression models. There is only one predictor in this case. Sometimes i get a good model with the original variables, sometimes i need to log the ...
51 views

### When to use the raw dataset as opposed to a transformed dataset for computing divergence?

Let us assume I have a set of observations: Dataset 1: Raw $A = [a_1,a_2,a_3,a_4,...]$ $B = [b_1,b_2,b_3,b_4,...]$ One assumptions before I proceed: Range of the values that the random variable ...
389 views

### Kriging on log transformed rainfall data

I am beginner in R. I had found in the literature that prior to performing kriging on the data, the distribution has to be investigated to check if it is Gaussian. So, in order to check if the data ...
250 views

### Logarithmic regression of form $y=a+b \log(x_1)+c\log(x_2)$ using R [closed]

How can I fit a logarithmic regression equation of form $y=a+b (\log (x_1)) + c(\log(x_2))$ on a data set using R? Here the main concern is that data contain zeros multiple times, so R will give ...
747 views

### Error in boxcox.default(y ~ x) : response variable must be positive

I am getting this error in R tool when I am performing box cox transformation on data. Please help. Why is this error coming ? https://dl.dropbox.com/u/53624395/11.csv : LINK FOR DATA FILE ON WHICH I ...
863 views

### How to perform boxcox transformation on data in R tool [duplicate]

Possible Duplicate: How should I transform non-negative data including zeros? Error in boxcox.default(y ~ x) : response variable must be positive I want to perform box cox transformation ...
135 views

### Removing noise and distortion from data

I have hundreds of data with peaks which look like this: My question On the left and right there is noise which you can see doesn't look anything like the usual peaks. My question is, how I would ...
2k views

### Box Cox Transforms for regression

I'm trying to fit a linear model on some data with just one predictor (say (x,y)). The data is such that for small values of x, the y values give a tight fit to a straight line, however as x values ...
660 views

### In R, how can I transform to normalize residuals when I have a U-shaped Q-Q plot?

I am running a two-way ANOVA with one random variable. My histogram of the residuals is showing considerable (negative?) skew: And my Q-Q plot of the residuals shows a corresponding U-shaped ...
2k views

### Box-Cox like transformation for independent variables?

Is there a Box-Cox like transformation for independent variables? That is, a transformation that optimizes the $x$ variable so that the y~f(x) will make a more ...
907 views

### Should you use normalized or non-normalized data to develope your model?

I am developing a linear model with 13 variables, including the target variable (online purchase revenue for items). So, I first built model1 with regular variable and then build model2 after ...
158 views

### Why is my replication of Silver & Dunlap 1987 not working out?

I'm trying to replicate Silver & Dunlap (1987). I'm just comparing averaging correlations or averaging z transform correlations and back transforming. I seem to not be replicating the asymmetry ...
387 views

### Interpretation of a log likelihood function for PROC NLMIXED in SAS

I have a data set of skewed nutrient intake values, from around 7800 individuals, of whom around 3000 had two measures of daily nutrient intake (the others only had one measure), so this is a repeated ...
263 views

### Manually transforming two dependent variables according to their correlation matrix in R?

I have two continuous variables, X and Y, that are correlated - they are not independent. To correct for non-independence, I have a known correlation structure, a matrix S. If one calls ...
1k views

### Transformation to fit gamma distribution for glm

The data simulated below has a maximum value of 4 and is interestingly skewed. The maximum of 4 is a limitation imposed by the instrument used and the data is semi-discrete, i.e., there are a ...
133 views

### How to analyse this data obtained from a simple physics experiment on attractive forces?

I did a simple physics experiment that measures the attractive force a plate experiences towards the other plate as a function of the applied voltage and distance between the plates. Now I have to ...
4k views

### Problem converting from factor to numeric variable in R [closed]

I'd like to convert a factor variable to a numeric one but as.numeric doesn't have the effect I expect. Below I get summary statistics for the numeric version of ...
3k views

### Estimating Lambda for Box Cox transformation for ANOVA

Assumptions: In an ANOVA where the normality assumptions are violated, the Box-Cox transformation can be applied to the response variable. The lambda can be ...
2k views

### Transposing data frames in R via unstack

I want to transpose a data frame in R with unstack. Consider the two data frames, a and b: ...
5k views

### Column-wise matrix normalization in R [closed]

I would like to perform column-wise normalization of a matrix in R. Given a matrix m, I want to normalize each column by dividing each element by the sum of the ...
50k views

### How to summarize data by group in R?

I have R data frame like this: ...
8k views

### How to change data between wide and long formats in R?

You can have data in wide format or in long format. This is quite an important thing, as the useable methods are different, depending on the format. I know you have to work with ...
5k views

### When to log transform a time series before fitting an ARIMA model

I have previously used forecast pro to forecast univariate time series, but am switching my workflow over to R. The forecast package for R contains a lot of useful functions, but one thing it doesn't ...
2k views

### Is it possible to directly read CSV columns as categorical data?

I need to analyze with R the data from a medical survey (with 100+ coded columns) that comes in a CSV. I will use rattle for some initial analysis but behind the scenes it's still R. If I read.csv() ...