Displaying 20 results from an estimated 3000 matches similar to: "Interpreting p values of gls in nlme"
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
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
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)
2009 Jan 28
1
gls prediction using the correlation structure in nlme
How does one coerce predict.gls to incorporate the fitted correlation
structure from the gls object into predictions? In the example below
the AR(1) process with phi=0.545 is not used with predict.gls. Is
there another function that does this? I'm going to want to fit a few
dozen models varying in order from AR(1) to AR(3) and would like to
look at the fits with the correlation structure
2003 Oct 24
2
NLME: gls parameter evaluation inconsistency (PR#4757)
Full_Name: W.B.Kloke
Version: 1.8.0
OS: FreeBSD-4.7
Submission from: (NULL) (195.253.22.63)
I found a parameter evaluation inconsistency in NLME package. I tried to use
gls() inside a function, and I wanted use gls() for different subsets of a data
frame:
prgls <- function(name){ gls( log10(Y)~(cond-1)+(cond-1):t
,pr,subset=subject==name)}
Applying this function with a string as parameter
2006 Jul 01
1
nlme: correlation structure in gls and zero distance
Dear listers,
I am trying to model the distribution of fox density over years in the
Doubs department. Measurements have been taken on 470 plots in March
each year and georeferenced. Average density is supposed to be different
each year.
In a first approach, I would like to use a general model of this type,
taking spatial correlation into account:
2003 Jul 03
1
beginner gls (nlme) question
Hi all,
I am trying to get a handle on gls (package nlme). I have a toy problem: 3 fixed factors (A, B, C), two levels each, 5 replicates per treatment. The response variable is continuous, normal. I have a correlation matrix of the form:
> mat
A B C
A 1.00 0.75 0
B 0.75 1.00 0
C 0.00 0.00 1
which is common to all observations.
How do I construct the call to gls? I think I need to
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)
##
2007 Nov 02
1
GLS with nlme
Hello All,
This is my third time attempting to post this message. I don't see it
in the archive, so I'm guessing it is not getting through. If I am
wrong, my apologies.
I am trying to do a GLS regression, (X'V^-1X)^-1X'V^-1y, using the gls()
function from the nlme package. I have the covariance matrix V. I have
been searching for a way to specify the correlation structure
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
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
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...
2012 Jan 27
2
Placing a Shaded Box on a Plot
Hello,
I would like to place shaded boxes on different areas of a
phylogenetic tree plot. Since I can not determine how to find axes on
the phylogenetic tree plot I am not able to place the box over certain
areas. Below is example code for the shaded box that I have tried to
use, and the first four values specify the position.
rect(110, 400, 135, 450, col="grey",
2013 Jun 03
1
Mixed effects model with a phylogenetic tree/ distance matrix as a random effect
Hi,
I'm trying to build a mixed-effects model in which I'd like to include
either a distance matrix or a phylogenetic tree as a random effect.
The troubles I've had are that:
1. Function lmer() in package lme4 only accepts a data frame column as a
random factor and not a distance matrix.
2. Function MCMCglmm() in package MCMCglmm only accepts a rooted and
ultrametric phylogenetic
2011 Apr 14
1
Overlaying images at nodes of phylogenetic tree
Can you recommend an R library that will help me create a diagram of a
phylogenetic tree on which specific images are placed at appropriate nodes of
the tree?
For example, I have specific image files associated with each member of the
phylogenetic tree, and I would like to automate the display of the image next to
the correct node of the tree. I can provide an image file with an example.
2018 Feb 20
1
question regarding the AICcmodavg package
Dear moderator,
If possible I would like to send in the following question for R-help:
I am analyzing a small data set using PGLS with phylogenetic uncertainty
taken into account and thereby including 100 potential phylogenetic tree
scenarios. I've managed to run models on all of the different trees and
performed model averaging to get parameter estimates for the intercept and
most of the
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
2007 Jan 26
1
Package for phylogenetic tree analyses
Hi
I am looking for a package that
1. reads in a phylogenetic tree in NEXUS format
2. given two members/nodes on the tree, can return the
distance between the two using the tree.
I came across the following packages on CRAN
ouch, ape, apTreeShape, phylgr all of which seem to
provide extensive range of functions for reading in a
Nexus-format tree and performing phylogenetic
analyses, tree
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
2009 Aug 20
1
definition of AIC and BIC in gls
Hello everybody,
Please help with connecting the AIC and BIC numbers printed by summary.gls to the logLik number.
1. is the logLik number the true ML or density scaling constants have been omitted?
2. what is the formula for calculating the AIC and BIC from logLik (and how can I see it)? I tried printing summary.gls but it says object not found.
Thank you very much.
Stephen
[[alternative