similar to: Least Squares Method

Displaying 20 results from an estimated 11000 matches similar to: "Least Squares Method"

2011 Apr 11
3
multiple comparisons with generalised least squares
Dear R users, I have used the following model: M1 <- gls(Nblad ~ Concentration+Season + Concentration:Season, data=DDD, weights=varIdent(form=~ 1 | Season*Concentration)) to assess the effect of Concentration and Season on nitrogen uptake by leaves (Nblad). I accounted for the difference in variance across the factor levels by using the varIdent function. Then I wanted to perform multiple
2011 Jan 25
1
Manual two-stage least squares in R
Hi, I am trying to manipulate a gls regression model output to adjust for use of two-stage least squares. Basically, I want to estimate a model, then feed in a new set of residuals, then re-calculate all of the model output (i.e. the standard errors of the estimators, etc.). I have found some documentation on doing this in stata, which is below: http://www.stata.com/help.cgi?ereturn I am
2007 May 09
1
generalized least squares with empirical error covariance matrix
I have a bayesian hierarchical normal regression model, in which the regression coefficients are nested, which I've wrapped into one regression framework, y = X %*% beta + e . I would like to run data through the model in a filter style (kalman filterish), updating regression coefficients at each step new data can be gathered. After the first filter step, I will need to be able to feed
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
2009 Jul 02
0
multiple comparisons and generalized least squares
Dear R users, I 'm working on a dataset consisting of 4 different dataframes with tree, leaf, fruit and seed measurements made on 300 trees, coming from 10 provenances (30 trees per provenance, 10 leaves/fruits/seeds per tree). Provenances are fixed effects (they were not randomly chosen), but trees within provenances and leaves/fruits/seeds within trees were randomly assigned. I wanted to
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
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:
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
2010 Jan 07
1
faster GLS code
Dear helpers, I wrote a code which estimates a multi-equation model with generalized least squares (GLS). I can use GLS because I know the covariance matrix of the residuals a priori. However, it is a bit slow and I wonder if anybody would be able to point out a way to make it faster (it is part of a bigger code and needs to run several times). Any suggestion would be greatly appreciated. Carlo
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
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 <-
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
2006 Nov 06
1
question about function "gls" in library "nlme"
Hi: The gls function I used in my code is the following fm<-gls(y~x,correlation=corARMA(p=2) ) My question is how to extact the AR(2) parameters from "fm". The object "fm" is the following. How can I extract the correlation parameters Phi1 and Phi2 from "fm"? These two parametrs is not in the "coef" componenet of "fm". Thanks a
2007 Jun 25
3
Bug in getVarCov.gls method (PR#9752)
Hello, I am using R2.5 under Windows. Looks like the following statement vars <- (obj$sigma^2)*vw in getVarCov.gls method (nlme package) needs to be replaced with: vars <- (obj$sigma*vw)^2 With best regards Andrzej Galecki Douglas Bates wrote: >I'm not sure when the getVarCov.gls method was written or by whom. To >tell the truth I'm not really sure what
2012 May 25
1
Problem with Autocorrelation and GLS Regression
Hi, I have a problem with a regression I try to run. I did an estimation of the market model with daily data. You can see to output below: /> summary(regression_resn) Time series regression with "ts" data: Start = -150, End = -26 Call: dynlm(formula = ror_resn ~ ror_spi_resn) Residuals: Min 1Q Median 3Q Max -0.0255690 -0.0030378 0.0002787
2011 Sep 04
2
AICc function with gls
Hi I get the following error when I try and get the AICc for a gls regression using qpcR: > AICc(gls1) Loading required package: nlme Error in n/(n - p - 1) : 'n' is missing My gls is like this: > gls1 Generalized least squares fit by REML Model: thercarnmax ~ therherbmax Data: NULL Log-restricted-likelihood: 2.328125 Coefficients: (Intercept) therherbmax 1.6441405
2008 May 02
1
Errors using nlme's gls with autocorrelation
Hi, I am trying out a generalized least squares method of forecasting that corrects for autocorrelation. I downloaded daily stock data from Yahoo Finance, and am trying to predict Close (n=7903). I have learned to use date functions to extract indicator variables for Monday - Friday (and Friday is missing in the model to prevent it from becoming full rank). When I run the following code...
2001 Oct 26
2
glim and gls
Hello, I would like to know if there is any package that allow us to fit Generalized Linear Models via Maximum Likelihood and Linear Models using Generalized Least Squarse in R as the functions glim and gls, respectively, from S-Plus. Also, anybody know if there is any package that fit Log-Linear Models using Generalized Least Squares? Any help will be very useful. Thanks, -- Frederico
2011 Aug 17
1
contrast package with interactions in gls model
Hi! I try to explain the efffect of (1) forest where i took samples's soils (* Lugar*: categorical variable with three levels), (2) nitrogen addition treatments (*Tra*: categorical variable with two levels) on total carbon concentration's soil samples (*C: *continue* *variable) during four months of sampling (*Time:* categorical and ordered variable with four levels). I fitted the
2006 Feb 08
1
logLik == -Inf in gls
I am trying to fit a generalised least squares model using gls in the nlme package. The model seems to fit very well when I plot the fitted values against the original values, and the model parameters have quite narrow confidence intervals (all are significant at p<5%). The problem is that the log likelihood is always given as -Inf. This doesn't seem to make sense because the model