similar to: function to generate weights for lm?

Displaying 20 results from an estimated 2000 matches similar to: "function to generate weights for lm?"

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
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
2008 Oct 23
1
Calculating confidence limits for the difference betweenmeans
Sender: r-help-bounces at r-project.org On-Behalf-Of: kingsfordjones at gmail.com Subject: Re: [R] Calculating confidence limits for the difference between means Message-Id: <2ad0cc110810231137n66760e43i61bdd0c89622d040 at mail.gmail.com> Recipient: ngottlieb at marinercapital.com -------------------------------------------------------- This information is being sent at the
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
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,
2009 Oct 22
1
removing random effect from nlme or using varPower() in nls
Hello, I've been fitting a random effects model using nlme to some data, but I am discovering that the variation in my random effect is very small. As a result, I would like to replace it as a fixed effect (i.e. essentially fit the same model but with no random effect). As I understand it I could do this using nls(), but I'm using a number of options such as weights = varPower()
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) ##
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
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 :
2008 Oct 23
15
VEC Operator in R
Can anyone please tell whether there is any R function to act as "VEC" and "VECH" operator on Matrix? Yes of course, I can write a user-defined-function for that or else, I can put dim(mat) <- NULL. However I am looking for some R function. Your help will be highly appreciated. Regards, -- View this message in context:
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.
2009 Jan 07
1
Extracting degrees of freedom from a gnls object
Dear all, How can I extract the total and residual d.f. from a gnls object? I have tried str(summary(gnls.model)) and str(gnls.model) as well as gnls(), but couldn?t find the entry in the resulting lists. Many thanks! Best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49
2009 Jul 23
1
setting up LMER for repeated measures and how do I get a p value for my fixed effect, group?
R 2.8.1 Windows XP I am trying to analyze repeated measures data (the data are listed at the end of this Email message) and I need help to make sure that I have properly specified my model, and would like to know why lmer does not return a p value for Group, my fixed effect. My subjects are divided into two groups (variable GROUP), individual subjects are indicated by the variable SS, Value is
2004 Oct 01
4
gnls or nlme : how to obtain confidence intervals of fitted values
Hi I use gnls to fit non linear models of the form y = alpha * x**beta (alpha and beta being linear functions of a 2nd regressor z i.e. alpha=a1+a2*z and beta=b1+b2*z) with variance function varPower(fitted(.)) which sounds correct for the data set I use. My purpose is to use the fitted models for predictions with other sets of regressors x, z than those used in fitting. I therefore need to
2009 Jan 11
2
R, clinical trials and the FDA
I hope that Marc doesn't mind, but I felt that part of his recent post was important enough to deserve it's own subject line rather then being lost in a 60-msg-long thread... On Sun, Jan 11, 2009 at 10:08 AM, Marc Schwartz <marc_schwartz at comcast.net> wrote: ... I strongly believe that the comments regarding R and the FDA are overly negative and pessimistic. The hurdles to
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
2007 Oct 17
2
nmle: gnls freezes on difficult case
Hi, I am not sure this is a bug but I can repeat it, The functions and data are below. I know this is nasty data, and it is very questionable whether a 4pl model is appropriate, but it is data fed to an automated tool and I would have hoped for an error. Does this repeat for anyone else? My details: > version _ platform i686-pc-linux-gnu
2009 Mar 05
1
ANOVA
Hi All, I have about one hundred patients and all the patients had their glucose measured on three different days. The days are all the same for all he patients. So I have three measurement for each patient . I want to know whether the day when the glucose was measured has an effect on the measurements. I was thinking to use a single factor analysis of variance but I am not sure how to do it in
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/