similar to: How to generate heteroscedastic random numbers?

Displaying 20 results from an estimated 400 matches similar to: "How to generate heteroscedastic random numbers?"

2007 Apr 16
1
Modelling Heteroscedastic Multilevel Models
Dear ListeRs, I am trying to fit a heteroscedastic multilevel model using lmer{lme4- package). Take, for instance, the (fictive) model below. lmer(test.result ~ homework + Sex -1 + (1 | School)) Suppose that I suspect the error terms in the predicted values to differ between men and women (so, on the first level). In order to model this, I want the 'Sex'-variable to be random on
2023 Aug 31
1
simulating future observations from heteroscedastic fits
Hello, All: I want to simulate future observations from fits to heteroscedastic data. A simple example is as follows: (DF3_2 <- data.frame(y=c(1:3, 10*(1:3)), gp=factor(rep(1:2, e=3)))) # I want to fit 4 models # and simulate future observations from all 4: fit11 <- lm(y~1, DF3_2) fit21 <- lm(y~gp, DF3_2) library(nlme) (fit12 <- lme(y~1, data=DF3_2,
2011 Aug 05
2
Loop: noob question
Hi, Can someone help me out to create a (for?) loop for the following procedure: x=rnorm(250,0,0.02) library(timeSeries) x=timeSeries(x) P=1000 loss=-P*x loss
2007 Jun 10
1
{nlme} Multilevel estimation heteroscedasticity
Dear All, I'm trying to model heteroscedasticity using a multilevel model. To do so, I make use of the nlme package and the weigths-parameter. Let's say that I hypothesize that the exam score of students (normexam) is influenced by their score on a standardized LR test (standLRT). Students are of course nested in "schools". These variables are contained in the
2009 Dec 13
0
How to control the skewness of a heteroscedastic variable?
Dear listusers, I don't know whether my problem is statistical or computational, but I hope I could recieve some help in either case. I'm currently working on a MC-simulation in which I would like to control the skewness of a heteroscedastic dependent variable defined as: y=d*z+sqrt(.5+.5*x^2)*e (eq.1) where d is a parameter and, z, x, and e are gamma r.vs. The variables x
2011 Jul 01
1
How to fit ARMA model
Hello, I am having some problems with fitting an ARMA model to my time series data (randomly generated numbers). The thing is I have tried many packages [tseries, fseries, FitARMA etc.] and all of them giving very different results. I would appreciate if someone could post here what the best package is for my purpose. Also, after having done the fitting, I would like to check for the model's
2005 Nov 03
1
Fitting heteroscedastic linear models/ problems with varIdent of nlme
Hi, I would like to fit a model for a factorial design that allows for unequal variances in all groups. If I am not mistaken, this can be done in lm by specifying weights. A function intended to specify weights for unequal variance structures is provided in the nlme library with the varIdent function. Is it apropriate to use these weights with lm? If not, is there another possibility to do
2009 Dec 13
0
How to control the skewness of a heteroscedastic variable? - A Correction
When going through my earlier post I find a mistake in the example that I provided. The correct version is provided below. I also start to suspect that my problem is that although the cumulant of a sum of independent variable is the sum of the cumulants, the moments of a sum is not the sum of the moments. But that might not be the only flaw in my application. Regards, Karl-Oskar #An
2011 Nov 02
0
heteroscedastic bivariate distribution with linear regression - prediction interval
Dear forum, which is the most suitable method to get the prediction interval of a bivariate normal distribution which is consistent with a linear model y = ax + b? I assume it is gls + predict. Am I correct? I'm rather new to R. Is there some reliable sample code for that problem? Thank you best regards -- View this message in context:
2008 Dec 01
1
linear functional relationships with heteroscedastic & non-Gaussian errors - any packages around?
Hi, I have a situation where I have a set of pairs of X & Y variables for each of which I have a (fairly) well-defined PDF. The PDF(x_i) 's and PDF(y_i)'s are unfortunately often rather non-Gaussian although most of the time not multi--modal. For these data (estimates of gas content in galaxies), I need to quantify a linear functional relationship and I am trying to do this as
2023 Aug 12
1
time series transformation....
dear members, I have a heteroscedastic time series which I want to transform to make it homoscedastic by a box cox transformation. I am using Otexts by RJ hyndman and George Athanopolous as my textbook. They discuss transformation and also say the fpp3 and the fable package automatically back transforms the point forecast. they also discuss the process which I find to be
2005 Nov 21
2
Multinomial Nested Logit package in R?
Dear R-Help, I'm hoping to find a Multinomial Nested Logit package in R. It would be great to find something analogous to "PROC MDC" in SAS: > The MDC (Multinomial Discrete Choice) procedure analyzes models > where the > choice set consists of multiple alternatives. This procedure > supports conditional logit, > mixed logit, heteroscedastic extreme value,
2001 Aug 21
2
Problem using GLM in a loop
Hello, I am try to perform a modeling which is relevant in a strongly heteroscedastic context. So I perform a dual modeling (modeling of both mean and variance of a response) in using the following loop: jointmod <- function(formula, data, itercrit=10,devcrit=0.0001) { # # Init step # init <- glm(formula=formula,family=gaussian, data=data) response <-
2016 Apr 04
0
Test for Homoscedesticity in R Without BP Test
Hi Deepak, In econometrics there is another test very often used : the white test. The white test is based on the comparison of the estimated variances of residuals when the model is estimated by OLS under the assumption of homoscedasticity and when the model is estimated by OLS under the assumption of heteroscedastic. The White test with R install.packages("bstats") library(bstats)
2003 Mar 14
0
gls with "crossed heteroscedasticity"
Dear All, I am using the function gls (in the nlme package) and I would like to fit a heteroscedastic model, with different variances for each of the levels of two stratification variables. In p. 210 of Pinheiro & Bates ("Mixed effects models in S and S-Plus", 2000, Springer), the authors show the use of the "*" operator. However, that is not what I want, because it
2007 Dec 06
3
correlated data
Hi, Is there an R library that has the same functionalities of Splus7.0+ library correlatedData? I'd appreciate any input. Hakan Demirtas [[alternative HTML version deleted]]
1999 Oct 08
1
dimnames and subscripting (PR#293)
I am not sure that this is a bug, but it was unexpected -- of course my expectations are fallible, eg column ordering in model.matrix()! When an array is subscripted the names of the dimnames list are lost (v 64.1). fred <- array(1:12, 2:4, list(A = letters[1:2], B = letters[3:5], C = letters[6:9])) dimnames(fred) dimnames(fred[1, , ]) dimnames(fred[1, , , drop=FALSE]) In the first
2016 Apr 04
1
Test for Homoscedesticity in R Without BP Test
On Mon, 4 Apr 2016, varin sacha via R-help wrote: > Hi Deepak, > > In econometrics there is another test very often used : the white test. > The white test is based on the comparison of the estimated variances of > residuals when the model is estimated by OLS under the assumption of > homoscedasticity and when the model is estimated by OLS under the > assumption of
2017 Aug 16
4
{nlme} Question about modeling Level two heteroscedasticity in HLM
Hello dear uesRs, I am working on modeling both level one and level two heteroscedasticity in HLM. In my model, both error variance and variance of random intercept / random slope are affected by some level two variables. I found that nlme is able to model heteroscedasticity. I learned how to use it for level one heteroscedasticity but don't know how to use it to model the level
2008 Sep 04
2
Correct for heteroscedasticity using car package
Dear all, Sorry if this is too obvious. I am trying to fit my multiple regression model using lm() Before starting model simplification using step() I checked whether the model presented heteroscedasticity with ncv.test() from the CAR package. It presents it. I want to correct for it, I used hccm() from the CAR package as well and got the Heteroscedasticity-Corrected Covariance Matrix. I am not