Hello, I've had no luck finding an R package that has the ability to estimate a Tobit model allowing for heteroskedasticity (multiplicative, for example). Am I missing something in survReg? Is there another package that I'm unaware of? Is there an add-on package that will test for heteroskedasticity? Thanks for your help. Cheers, Alan Spearot -- Alan Spearot Department of Economics University of Wisconsin - Madison acspearot@wisc.edu [[alternative HTML version deleted]]
Powell's quantile regression method is available in the quantreg package rq(..., method="fcen", ...) url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu Department of Economics vox: 217-333-4558 University of Illinois fax: 217-244-6678 Champaign, IL 61820 On Apr 25, 2006, at 2:07 PM, Alan Spearot wrote:> Hello, > > I've had no luck finding an R package that has the ability to > estimate a > Tobit model allowing for heteroskedasticity (multiplicative, for > example). > Am I missing something in survReg? Is there another package that I'm > unaware of? Is there an add-on package that will test for > heteroskedasticity? > > Thanks for your help. > > Cheers, > Alan Spearot > > -- > Alan Spearot > Department of Economics > University of Wisconsin - Madison > acspearot at wisc.edu > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting- > guide.html
On Tue, 25 Apr 2006, Alan Spearot wrote:> Hello, > > I've had no luck finding an R package that has the ability to estimate a > Tobit model allowing for heteroskedasticity (multiplicative, for example). > Am I missing something in survReg? Is there another package that I'm > unaware of? Is there an add-on package that will test for > heteroskedasticity?If you mean survreg() [rather than survReg(), which is in S-PLUS] then it can estimate models where the variance depends on a discrete covariate by adding a strata() term to the model formula. For example:> survreg(Surv(futime, fustat) ~ ecog.ps+strata(rx), data = ovarian,+ dist = "weibull") Call: survreg(formula = Surv(futime, fustat) ~ ecog.ps + strata(rx), data = ovarian, dist = "weibull") Coefficients: (Intercept) ecog.ps 8.0159674 -0.5940253 Scale: rx=1 rx=2 1.2047759 0.5605876 Loglik(model)= -96.2 Loglik(intercept only)= -97.1 Chisq= 1.68 on 1 degrees of freedom, p= 0.2 n= 26 is a weibull model with different variance depending on the value of rx. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle
Hi R-users, when carrying out a multiple regression, say lm(y~x1+x2), we can use an anova of the regression with summary.aov(lm(y~x1+x2)), and afterwards evaluate the relative contribution of each variable using the global Sum of Sq of the regression and the Sum of Sq of the simple regression y~x1. Now I would like to incorporate a random effect in the model, as some data correspond to the same region and others not: mylme<- lme(y~x1+x2, random= ~1|as.factor(region)). I would like to know, if possible, which is the contribution of each variable to the global variability. Using anova(mylme) produce an anova table (without the Sum of Sq column), but I am not sure how can I derive the contribution of each variable from it, or even whether it is nonsense to try, nor can I derive a measure of how much variability is left unexplained. Sorry for the type of question, but I did not find a simple solution and some researchers I work with love to have relative contributions to global variability. Thanks a lot in advance, Berta>
The variances of the random effects and the residual variances are given by the summary function. Maybe VarCorr or varcomp gives you the answer you are looking for: library(nlme) library(ape) ?VarCorr ?ape JR El mi?, 07-03-2007 a las 13:09 +0100, Berta escribi?:> Hi R-users, > > when carrying out a multiple regression, say lm(y~x1+x2), we can use an > anova of the regression with summary.aov(lm(y~x1+x2)), and afterwards > evaluate the relative contribution of each variable using the global Sum of > Sq of the regression and the Sum of Sq of the simple regression y~x1. > > Now I would like to incorporate a random effect in the model, as some data > correspond to the same region and others not: mylme<- lme(y~x1+x2, random= > ~1|as.factor(region)). I would like to know, if possible, which is the > contribution of each variable to the global variability. Using anova(mylme) > produce an anova table (without the Sum of Sq column), but I am not sure how > can I derive the contribution of each variable from it, or even whether it > is nonsense to try, nor can I derive a measure of how much variability is > left unexplained. > > Sorry for the type of question, but I did not find a simple solution and > some researchers I work with love to have relative contributions to global > variability. > > Thanks a lot in advance, > > Berta > > > > > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Dipl.-Biol. JR Ferrer Paris ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Laboratorio de Biolog?a de Organismos --- Centro de Ecolog?a Instituto Venezolano de Investigaciones Cient?ficas (IVIC) Apdo. 21827, Caracas 1020-A Rep?blica Bolivariana de Venezuela Tel: (+58-212) 504-1452 Fax: (+58-212) 504-1088 email: jferrer at ivic.ve clave-gpg: 2C260A95
Thanks Jos? Rafael, I will try with library(ape) (at the moment I cannot load it). VarCorr gives the variance estimates for the random effect and the error terms. However, what I am looking for is a measure of the explained proportion of variance, such as it is R2 in regression models, and more precisely, I am looking for a measure of the explained proprotion of variance of each of the variables considered (continuous variables and other with random slope). For example, Snijders and Bosker (2003) pg 102 dedicate a chapter in their book to "how much does the multilevel model explain" (chapter 7) and derive formulaes for R_1 and R_2 (variance in the first and second level respectively). Things seem to get complicated when a slope random effect is included in the model, as in my case. It seems that package HLM provides the necessary estimates. I will have a look at library(ape), thanks for the suggestion. The book I mention is: Snijders, TAB and Bosker RJ (2003). Multilevel Analysis. An introduction to basic and advanced multilevel modeling. SAGE, London. Berta ----- Original Message ----- From: "Jos? Rafael Ferrer Paris" <jr_frrr at yahoo.de> To: "Berta" <ibanez at bioef.org> Cc: <r-help at stat.math.ethz.ch> Sent: Wednesday, March 07, 2007 5:16 PM Subject: Re: [R] anova applied to a lme object> The variances of the random effects and the residual variances are given > by the summary function. Maybe VarCorr or varcomp gives you the answer > you are looking for: > > library(nlme) > library(ape) > ?VarCorr > ?ape > > JR > El mi?, 07-03-2007 a las 13:09 +0100, Berta escribi?: >> Hi R-users, >> >> when carrying out a multiple regression, say lm(y~x1+x2), we can use an >> anova of the regression with summary.aov(lm(y~x1+x2)), and afterwards >> evaluate the relative contribution of each variable using the global Sum >> of >> Sq of the regression and the Sum of Sq of the simple regression y~x1. >> >> Now I would like to incorporate a random effect in the model, as some >> data >> correspond to the same region and others not: mylme<- lme(y~x1+x2, >> random>> ~1|as.factor(region)). I would like to know, if possible, which is the >> contribution of each variable to the global variability. Using >> anova(mylme) >> produce an anova table (without the Sum of Sq column), but I am not sure >> how >> can I derive the contribution of each variable from it, or even whether >> it >> is nonsense to try, nor can I derive a measure of how much variability is >> left unexplained. >> >> Sorry for the type of question, but I did not find a simple solution and >> some researchers I work with love to have relative contributions to >> global >> variability. >> >> Thanks a lot in advance, >> >> Berta >> >> >> >> > >> >> ______________________________________________ >> R-help at stat.math.ethz.ch mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > -- > Dipl.-Biol. JR Ferrer Paris > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Laboratorio de Biolog?a de Organismos --- Centro de Ecolog?a > Instituto Venezolano de Investigaciones Cient?ficas (IVIC) > Apdo. 21827, Caracas 1020-A > Rep?blica Bolivariana de Venezuela > > Tel: (+58-212) 504-1452 > Fax: (+58-212) 504-1088 > > email: jferrer at ivic.ve > clave-gpg: 2C260A95 > > > > ___________________________________________________________ > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de > > > >
Possibly Parallel Threads
- Large number of dummy variables
- censReg or tobit: testing for assumptions in R?
- heteroskedasticity-robust standard errors
- Testing autocorrelation & heteroskedasticity of residuals in ts
- USING TOBIT OR WHAT ALTERNATIVE WHEN DATA ARE PANEL AND HETEROSKEDASTIC AND PROBABLY AUTOCORRELATED?