similar to: Which gls models to use?

Displaying 20 results from an estimated 5000 matches similar to: "Which gls models to use?"

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]]
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 17
1
anova.gls from nlme on multiple arguments within a function fails
Dear All -- I am trying to use within a little table producing code an anova comparison of two gls fitted objects, contained in a list of such object, obtained using nlme function gls. The anova procedure fails to locate the second of the objects. The following code, borrowed from the help page of anova.gls, exemplifies: --------------- start example code --------------- library(nlme) ##
2009 Aug 19
1
how to specify two variance effects in gls
Hello everybody, I have a dataset where each row has number of subjects and that gives me natural weights for the variance function. Additionally I see that variance increases with Age, which is a regressor. So using gls I have weights=varFixed(~1/n) but don't know how to include the extra effect of the regressor. Fitted values show a quadratic curve vs. age, not sure if that helps.
2000 Mar 07
1
Problems with nlme (PR#471)
Dear R developers, first of all let me join the chorus of congratulations for the release of R 1.0.0. Well, done! Unfortunately, I find it necessary to e-mail in a bug report regarding the `nlme' package. On my office machine I experience the following trouble: bossiaea:/opt/R$ R CMD check -c nlme Checking package `nlme' ... Massaging examples into `nlme-Ex.R' ... Running
2009 Sep 01
1
understanding the output from gls
I'd like to compare two models which were fitted using gls, however I'm having trouble interpreting the results of gls. If any of you could offer me some advice, I'd greatly appreciate it. Short explanation of models: These two models have the same fixed-effects structure (two independent, linear effects), and differ only in that the second model includes a corExp structure for
2004 Dec 29
3
gls model and matrix operations
Dear List: I am estimating a gls model and am having to make some rather unconventional modifications to handle a particular problem I have identified. My aim is to fit a GLS with an AR1 structure, obtain the variance-covariance matrix (V), modify it as needed given my research problem, and then reestimate the GLS by brute force using matrix operations. All seems to be working almost perfectly,
2013 Apr 30
1
Error message
Hi there I am a Masters student at the University of Stellenbosch. I have been using R to analyze the data, using the GLS model, of one of my experiments. The problem that I am having is that whenever I run my model using: fit.glsmodel1<-gls(Number~as.factor(Season)+as.factor(Depth)+as.factor(Orientation), data=Number, weights=varPower(), method="ML") I get the error: Error in
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
2012 May 02
3
Consulta gráfica
  Hola,   Por favor, ¿podríais indicarme qué recursos (librerías o ideas) pueden resultar de utilidad para crear un gráfico del estilo del de la figura 3.8 del siguiente link?   http://www.tsc.uvigo.es/BIO/Bioing/ChrLDoc3.html#3.5   Actualmente estoy utilizando funciones muy básicas y la verdad es que no me encuentro muy satisfecha con el resultado.   Muchas gracias.   Eva [[alternative HTML
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
2010 May 28
1
latex.rms and models fit with GLS
Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what you get with print(fit)) into latex format? I have tried: f <- Gls(...) latex(f, file='') ... but I get the following error Error in replace.substring.wild(s, old, new, test = test, front = front, : does not handle > 1 * in
2010 Mar 09
1
Computation of AIC for gls models
Dear Colleagues, We are using the phylog.gls.fit() function from the R package "PHYLOGR" (Diaz-Uriarte R, Garland T: PHYLOGR: Functions for phylogenetically based statistical analyses. 2007. Available at [http://cran.r-project.org/web/packages/PHYLOGR/index.html]) to correct for lack of independence between data points. (In our particular case, the lack of independence is due to
2006 Mar 16
2
DIfference between weights options in lm GLm and gls.
Dear R-List users, Can anyone explain exactly the difference between Weights options in lm glm and gls? I try the following codes, but the results are different. > lm1 Call: lm(formula = y ~ x) Coefficients: (Intercept) x 0.1183 7.3075 > lm2 Call: lm(formula = y ~ x, weights = W) Coefficients: (Intercept) x 0.04193 7.30660 > lm3 Call:
2010 Jun 24
1
Question on WLS (gls vs lm)
Hi all, I understand that gls() uses generalized least squares, but I thought that maybe optimum weights from gls might be used as weights in lm (as shown below), but apparently this is not the case. See: library(nlme) f1 <- gls(Petal.Width ~ Species / Petal.Length, data = iris, weights = varIdent(form = ~ 1 | Species)) aa <- attributes(summary(f1)$modelStruct$varStruct)$weights f2 <-
2012 Apr 19
2
Gls function in rms package
Dear R-help, I don't understand why Gls gives me an error when trying to fit a model with AR(2) errors, while gls (from nlme) does not. For example: library(nlme) library(rms) set.seed(1) d <- data.frame(x = rnorm(50), y = rnorm(50)) gls(y ~ x, data=d, correlation = corARMA(p=2)) #This works Gls(y ~ x, data=d, correlation = corARMA(p=2)) # Gives error # Error in
2011 Jul 11
1
GLS - Plotting Graphs with 95% conf interval
Hi, I am trying to plot the original data with the line of the model using the predict function. I want to add SE to the graph, but not sure how to get them out as the predict function for gls does not appear to allow for SE=TRUE argument. Here is my code so far: f1<-formula(MaxNASC40_50~hu3+flcmax+TidalFlag) vf1Exp<-varExp(form=~hu3) B1D<-gls(f1,correlation=corGaus(form=Lat~Lon,
2003 Sep 25
1
Error from gls call (package nlme)
Hi I have a huge array with series of data. For each cell in the array I fit a linear model, either using lm() or gls() with lm() there is no problem, but with gls() I get an error: Error in glsEstimate(glsSt, control = glsEstControl) : computed gls fit is singular, rank 2 as soon as there are data like this: > y1 <- c(0,0,0,0) > x1 <- c(0,1,1.3,0) > gls(y1~x1)
2004 Oct 08
1
nlme vs gls
Dear List: My question is more statistical than R oriented (although it originates from my work with nlme). I know statistical questions are occasionally posted, so I hope my question is relevant to the list as I cannot turn up a solution anywhere else. I will frame it in the context of an R related issue. To illustrate the problem, consider student achievement test score data with multiple
2009 Sep 22
1
odd (erroneous?) results from gls
A couple weeks ago I posted a message on this topic to r-help, the response was that this seemed like odd behavior, and that I ought to post it to one of the developer lists. I posted to r-sig-mixed-models, but didn't get any response. So, with good intentions, I decided to try posting once more, but to this more general list. The goal is (1) FYI, to make you aware of this issue, in case it