Skip to main content
31 events
when toggle format what by license comment
Jun 9, 2013 at 22:45 vote accept zgall1
Jun 9, 2013 at 22:45 vote accept zgall1
Jun 9, 2013 at 22:45
Jun 9, 2013 at 22:45 vote accept zgall1
Jun 9, 2013 at 22:45
Jun 9, 2013 at 21:53 comment added zgall1 Could you elaborate on what you mean by a different variance function?
Jun 9, 2013 at 6:17 comment added Glen_b Because your first diagnostic plot shows distinct lack of fit in the mean, the other plots aren't particularly informative; it's hard to disentangle a problem in those plots from the already identified model failure. Your GLM results suggest using a model with a different variance-function
Jun 8, 2013 at 21:04 history edited COOLSerdash CC BY-SA 3.0
added 351 characters in body
Jun 8, 2013 at 15:33 comment added Nick Cox I don't use R routinely, so you need help from someone accustomed to GLM in R.
Jun 8, 2013 at 15:33 answer added COOLSerdash timeline score: 35
Jun 8, 2013 at 15:27 comment added zgall1 I tried the GLM with log-link using the original data set and received the following error: Error in eval(expr, envir, enclos) : cannot find valid starting values: please specify some I did some searching and found the following link that mentions this problem - stackoverflow.com/questions/8212063/… - but was not able to figure out how to apply the suggestions to my particular problem. Any help would be appreciated.
Jun 8, 2013 at 15:25 comment added zgall1 Nick - I appreciate your fuller explanation. I will try the GLM with log-link using the original data set. The Box-Cox function doesn't appear to work with negative values or zeros (as you hinted at) and I'm not aware of an alternative function.
Jun 8, 2013 at 15:21 comment added Nick Cox I will edit my answer to expand on the previous comment.
Jun 8, 2013 at 15:19 comment added Nick Cox You are correct; I recommend against that. Quite apart from not respecting the data, you just created lots of massive outliers on the logarithmic scale. A very, very small value instead of zero is not a conservative change; it's a drastic one! I don't mean to be offensive about baseball; I just won't understand your rationale. But what you just did is statistically inadvisable, regardless of the nature of the data.
Jun 8, 2013 at 15:15 comment added zgall1 @COOLSerdash These are the diagnostic graphs after running the GLM with log-link. It looks better but there are still clearly some issues. i.imgur.com/FjjAdoW.jpg
Jun 8, 2013 at 15:14 comment added zgall1 I wish I could understand that Wikipedia link. With regards to the zero and negative values, I simply re-coded them as 0.000001. While I'm sure you will hate that, I have strong reasons to believe that this will have absolutely no impact on the model. As you said you had no interest in baseball minutiae, I will refrain from explaining my rationale.
Jun 8, 2013 at 15:06 comment added Nick Cox What does the Box-Cox function in MASS do with zero and negative values? Note that the Wikipedia link does explain what $\lambda$ is.
Jun 8, 2013 at 14:56 comment added zgall1 @COOLSerdash Here is the boxcox graphic. Would you be able to explain how exactly take the boxcox transformation data, specifically the λ value, and use it to transform my data?
Jun 8, 2013 at 14:26 comment added COOLSerdash A general approach to transformation are Box-Cox transformations. What you could do is the following: 1. Fit your regression model with lm using the untransformed variables. 2. Use the function boxcox(my.lm.model) from the MASS package to estimate $\lambda$. The command also produces a graphic that you could upload for our convenience.
Jun 8, 2013 at 14:14 comment added COOLSerdash As @Nick recommended in his answer, you might try a GLM with a log-link. In R, this can be achieved by typing: my.mod <- glm(WAR~x1+x2, family=gaussian(link = "log")) where x1 etc. are your independent variables. Just in case: categorical variables have to be coded as factors in R or can be included directly with factor(x3) if x3 is a categorical variable.
Jun 8, 2013 at 14:09 history edited COOLSerdash CC BY-SA 3.0
added 34 characters in body
Jun 8, 2013 at 14:00 history tweeted twitter.com/#!/StackStats/status/343366947339108354
Jun 8, 2013 at 14:00 history edited COOLSerdash CC BY-SA 3.0
added 113 characters in body
Jun 8, 2013 at 13:59 comment added zgall1 @COOLSerdash Here you go - i.imgur.com/k9LFsP4.jpg You'll notice there are 5 dummy variables. I can remove them if they make reading the scatterplot easier.
Jun 8, 2013 at 13:52 answer added Nick Cox timeline score: 8
Jun 8, 2013 at 13:49 comment added COOLSerdash Thanks for the graphic. You are absolutely right by saying that this fit is suboptimal. Could you please produce a scatterplot matrix with the DV and IVs in the regression? This can be done in R with the command pairs(my.data, lower.panel = panel.smooth) where my.data would be your dataset.
Jun 8, 2013 at 13:45 comment added zgall1 @COOLSerdash I took a look at the link. I have a basic background in statistics so I understand the discussion. However, my problem is that I have limited experience with actually applying the techniques I have learned so I struggle to figure out what exactly I need to do with my data (either in Excel or R) to actually perform the necessary transformations.
Jun 8, 2013 at 13:41 history edited COOLSerdash CC BY-SA 3.0
added 132 characters in body
Jun 8, 2013 at 13:40 comment added zgall1 Thank for you for both the link and the suggestion. I have run my regression and I know the variables need to be transformed based on the following plot: i.imgur.com/rbmu14M.jpg I can see unbiasedness and lack of constant variability in the residuals. Also, they are not normal.
Jun 8, 2013 at 13:38 review First posts
Jun 8, 2013 at 14:11
Jun 8, 2013 at 13:26 comment added COOLSerdash Hi @zglaa1 and welcome. Why do you think that you have to transform the variables? The first step would be to fit the regression with the original varibales and then look at the fit (residuals etc.). The residuals should approximately normally distributed, not the variables. Maybe you'll find this post interesting.
Jun 8, 2013 at 13:23 history edited COOLSerdash CC BY-SA 3.0
added 12 characters in body
Jun 8, 2013 at 13:22 history asked zgall1 CC BY-SA 3.0