similar to: Advice on picking a regression method

Displaying 20 results from an estimated 3000 matches similar to: "Advice on picking a regression method"

2005 Feb 10
2
correcting for autocorrelation in models with panel data?
Hi I have some panel data for the 50 US states over about 25 years, and I would like to test a simple model via OLS, using this data. I know how to run OLS in R, and I think I can see how to create Panel Corrected Standard Errors using http://jackman.stanford.edu/classes/350C/pcse.r What I can't figure out is how to correct for autocorrelation over time. I have found a lot of R stuff on
2004 Aug 09
2
displaying computation outputs inside "for" loops
Dear R-users, I am puzzled by for loops and am kind of ashamed to ask because it is so simple. There must be something I am missing in the way they are executed. Basically, I would like to iterate a given number of time and generate a bunch of stats (that's what loops are designed for, right?). Before doing this I simply want to test simple procedure and see if they work (ie got the syntax
2004 Aug 31
1
appending data to a dataframe
Dear R users, I am sorry to ask you such a pathetic newbie question, but how does one append data at the end of a data frame? I am working with GRASS/R library, but the question is about R. I have a data.frame containing the following variables basinID, distoutlet, drainage_area, slope These variables are stored for all pixels of Grass Raster objects. For each drainage basin (basinID), I'd
2013 Apr 18
1
Statistical test for heteroscedasticity for an object of class "gls"
Hi there, Does anyone know of a statistical test for heteroscedasticity for an object of class "gls"? (or alternative objective methods). Thanks in advance, Ben Gillespie, Research Postgraduate o-------------------------------------------------------------------o School of Geography, University of Leeds, Leeds, LS2 9JT o-------------------------------o http://www.geog.leeds.ac.uk/
2008 Apr 29
2
function to generate weights for lm?
Hi, I would like to use a weighted lm model to reduce heteroscendasticity. I am wondering if the only way to generate the weights in R is through the laborious process of trial and error by hand. Does anyone know if R has a function that would automatically generate the weights need for lm? Thanks, -- Tom [[alternative HTML version deleted]]
2008 May 09
1
Which gls models to use?
Hi, I need to correct for ar(1) behavior of my residuals of my model. I noticed that there are multiple gls models in R. I am wondering if anyone has experience in choosing between gls models. For example, how should one decide whether to use lm.gls in MASS, or gls in nlme for correcting ar(1)? Does anyone have a preference? Any advice is appreciated! Thanks, -- Tom [[alternative HTML
2001 Dec 27
1
gls
A couple of questions: How to be sure that gls allowes errors to be correlated and/or have unequal variances? (is this on auto or is there a switch?) How to calculate confidence limits for a linear regresssion? -------------- next part -------------- A non-text attachment was scrubbed... Name: dthompson.vcf Type: text/x-vcard Size: 303 bytes Desc: Card for David Thompson Url :
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 Feb 10
2
Help regarding White's Heteroscedasticity Correction
Hi I am actually running the White test for correcting Heteroscedasticity. I used sandwich() & car(), however the output shows the updated t test of coefficients, with revised Standard Errors, however the estimates remained same. My problem is that the residuals formed a pattern in the original regression equation. After running the White's test, I got some new standard errors - but
2011 Aug 29
1
Bayesian functions for mle2 object
Hi everybody, I'm interested in evaluating the effect of a continuous variable on the mean and/or the variance of my response variable. I have built functions expliciting these and used the 'mle2' function to estimate the coefficients, as follows: func.1 <- function(m=62.9, c0=8.84, c1=-1.6) { s <- c0+c1*(x) -sum(dnorm(y, mean=m, sd=s,log=T)) } m1 <- mle2(func.1,
2007 Jan 17
2
Slow at loading large folder tree
The thing is, on the same machine, same net same moment, when I load the same folder from windows XP (through parallels) it takes like 10sec while samba 10min!!! MTU is 1500, set to match 100T devices like router and NAS on the LAN. Even on crossover cable it freaks out the same way. Btw my NAS is a Lacie Ethernet drive with linux based firmware and samba. Funny enough I load folders (ie
2005 Dec 09
1
R-help: gls with correlation=corARMA
Dear Madams/Sirs, Hello. I am using the gls function to specify an arma correlation during estimation in my model. The parameter values which I am sending the corARMA function are from a previous fit using arima. I have had some success with the method, however in other cases I get the following error from gls: "All parameters must be less than 1 in absolute value". None of
2000 Mar 14
1
qr.solve (fwd)
Two friend reported me a problem, which I can't solve: (I run R-1.0.0, Debian Linux) They hava a function "corr.matrix" (see end of mail), and when they create a 173x173 matrix with this function V <- corr.matrix(0.3, n=173) V1 <- qr.solve(V) reports: Error in qr(a, tol = tol) : NA/NaN/Inf in foreign function call (arg 1) For n < 173, qr.solve returns the correct
2004 Jan 14
2
Generalized least squares using "gnls" function
Hi: I have data from an assay in the form of two vectors, one is response and the other is a predictor. When I attempt to fit a 5 parameter logistic model with "nls", I get converged parameter estimates. I also get the same answers with "gnls" without specifying the "weights" argument. However, when I attempt to use the "gnls" function and try to
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called directly by users. rms uses generic functions defined in other packages. For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms. I use:
2013 Feb 06
1
Heteroscedasticity Plots
To detect heteroscedasticity for a multiple linear OLS regression (no time dependencies): What if the residuals vs. fitted values plot shows well behaved residuals (cloud) - but the some of the x versus residuals plots are a megaphone? Also, it seems that textbooks and internet tutorials in R do not agree what is the best plot for detecting heteroscedasticity. What do you use? I found so
2005 Aug 29
1
Different sings for correlations in OLS and TSA
Dear list, I am trying to re-analyse something. I do have two time series, one of which (ts.mar) might help explaining the other (ts.anr). In the original analysis, no-one seems to have cared about the data being time-series and they just did OLS. This yielded a strong positive correlation. I want to know if this correlation is still as strong when the autocorrelations are taken into account.
2006 Aug 09
1
Joint confidence intervals for GLS models?
Dear All, I would like to be able to estimate confidence intervals for a linear combination of coefficients for a GLS model. I am familiar with John Foxton's helpful paper on Time Series Regression and Generalised Least Squares (GLS) and have learnt a bit about the gls function. I have downloaded the gmodels package so I can use the estimable function. The estimable function is very
2004 Oct 15
8
Testing for normality of residuals in a regression model
Hi all, Is it possible to have a test value for assessing the normality of residuals from a linear regression model, instead of simply relying on qqplots? I've tried to use fitdistr to try and fit the residuals with a normal distribution, but fitdsitr only returns the parameters of the distribution and the standard errors, not the p-value. Am I missing something? Cheers, Federico
2008 Mar 18
1
lme library
Dear authors, I?m an Italian PhD student and I?m dealing with linear mixed models. I?d like to use your lme library, but I have a problem. I?m able to estimate a null model. For example, using SAS data, I can estimate the model: lme(y ~ 1, data = Mississippi, random = ~ 1|influent, method="ML") As suggested in the literature I want to ?test? the significance of the second level