Skip to main content
21 events
when toggle format what by license comment
Mar 21, 2017 at 15:18 history edited kjetil b halvorsen
edited tags
Feb 27, 2017 at 14:33 history edited kjetil b halvorsen
edited tags
Jan 27, 2017 at 19:32 vote accept user44796
Jan 27, 2017 at 19:17 history tweeted twitter.com/StackStats/status/825060185836310528
Jan 27, 2017 at 18:53 answer added gung - Reinstate Monica timeline score: 11
Jan 27, 2017 at 18:34 vote accept user44796
Jan 27, 2017 at 19:32
Jan 27, 2017 at 17:30 comment added Nick Cox On the spelling, see (or on the other hand don't see if you don't care one bit) stats.stackexchange.com/questions/153526/…
Jan 27, 2017 at 17:28 history edited Nick Cox CC BY-SA 3.0
added 6 characters in body; edited title
Jan 27, 2017 at 16:46 answer added kjetil b halvorsen timeline score: 5
Jan 27, 2017 at 16:23 comment added user44796 Yes, my question is how do I estimate sigma2, which is equivalent to n^1.3. If I have a formula to estimate sigma2, then I can simulate the data. But in the toy example, I only know it because I wrote it.
Jan 27, 2017 at 15:44 comment added whuber OK, but my last comment still seems apt: you need to postulate some kind of model for the behavior of the residuals. In the model you use to generate the data, the residual SD is proportional to the regressor. Is that exactly the kind of model you want to fit? Or do you need to contemplate other forms of relationship between the error variance and the regressor (or response) values?
Jan 27, 2017 at 15:38 comment added user44796 Hopefully I have clarified my question with edits. In the above question, n and y represent the empirical data. I want to fit a model to the data and then use the model to generate simulated data that matches the mean and residuals of the original data.
Jan 27, 2017 at 15:36 history edited user44796 CC BY-SA 3.0
added 247 characters in body
Jan 27, 2017 at 15:23 history reopened whuber
Jan 27, 2017 at 15:23 history closed whuber Needs details or clarity
Jan 27, 2017 at 15:22 comment added whuber I do not understand your question, because your code accomplishes exactly what you seem to be asking for in its title: it simulates a linear regression with heteroscedastic errors. Are you asking for methods to estimate some kind of model for the heteroscedasticity? If so, then you need to specify a model!
Jan 27, 2017 at 15:19 history edited user44796 CC BY-SA 3.0
changed lm(n ~ y) to lm(y ~n)
Jan 27, 2017 at 15:04 comment added kjetil b halvorsen There is aN ERROR IN YOUR CODE, YOU MUST USE ` lm( y ~ n)`
Jan 27, 2017 at 14:55 comment added user44796 You're right. I am trying to use a linear model to capture the heterogeneity. I think that I should be using a generalized least squares model. If there are any other recommendations, I will try them.
Jan 27, 2017 at 14:44 comment added generic_user So the linear model won't capture conditional heteroskedasticity unless it explicitly tries to do so, using one of a few approaches. Standard econometric techniques adjust the standard errors on parameters to account for heteroskedasticity, but they don't explicitly model it.
Jan 27, 2017 at 14:40 history asked user44796 CC BY-SA 3.0