Tagged Questions
0
votes
0answers
46 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 ...
1
vote
2answers
44 views
Dealing with grouped / rounded data
I have a dataset that includes variables about customer income levels. The income was collected in binned fashion (...
0
votes
0answers
51 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 ...
0
votes
0answers
46 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:
...
0
votes
1answer
107 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.
...
0
votes
1answer
70 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 ...
2
votes
3answers
161 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 ...
0
votes
0answers
38 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 ...
0
votes
1answer
106 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 ...
0
votes
0answers
43 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 ...
3
votes
2answers
214 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 ...
-1
votes
1answer
208 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 ...
0
votes
1answer
255 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 ...
-2
votes
1answer
171 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 ...
0
votes
0answers
81 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 ...
4
votes
4answers
876 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 ...
1
vote
2answers
375 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 ...
7
votes
1answer
1k 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 ...
2
votes
2answers
525 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 ...
9
votes
2answers
2k views
How to deal with collinearity issue when performing variable selection?
I've got a dataset with 9 continuous independent variables that I'm trying to select between to fit a model to a single percentage (dependent) variable, Score.
...
6
votes
1answer
136 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 ...
1
vote
0answers
304 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 ...
4
votes
1answer
219 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 ...
5
votes
2answers
833 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 ...
3
votes
1answer
126 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 ...
0
votes
2answers
2k 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 ...
5
votes
2answers
2k 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 ...
1
vote
3answers
1k 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:
...
6
votes
3answers
3k 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 ...
31
votes
7answers
29k views
13
votes
4answers
4k 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 ...
9
votes
4answers
4k 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 ...
4
votes
2answers
1k 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() ...

