I am trying to do a transformation of a data set, while analyzing a certain data set, and I want to calculate the inverse of a certain variable set. Kindly let the know the syntax for calculating the inverse of a number in R
Thank you very much Jos Feys , Hamid Ghorbani and Salvatore S. Mangiafico for your responses. I am trying to calculate the inverse as in x = 1/x. When I tried doing a linear model of a data set, it didnt satisfy the conditions or normality. So I tried transforming the data set using logarithm, still it is not satisfying the normality criteria. So, i want to try calling the inverse of the variable, before I do another. Can you help with this?
Be sure you understand the assumptions of the model you are using. It isn't the data that should be normally distributed. It is the errors from the model, which you might assess by looking at the residuals.
A Box-Cox transformation may be helpful for your purpose. This is easy in R with the MASS package.
Otherwise, a non-parametric approach or generalized linear model may be appropriate for your analysis.
What's probably most helpful if you want a helpful response is to describe the nature of your dependent variable. Ideally provide a similar data set of hypothetical data, or the actual data set you are working with with enough detail so that someone could understand what model would be appropriate.