Displaying 20 results from an estimated 10000 matches similar to: "Weighted Least Square Model for a Binary Outcome"
2011 Jun 24
0
a Weighted Least Square model for a binary response variable
Dear R Users,
I would like to use R to fit a Weighted Least Square model for a
binary response variable, say Y. The model is actually the model
widely used for a binary dependent variable when the logistic model
has not been invented. The weight is 1/(E(Y)(1-E(Y)).
Could someone help me out? Thanks for any replies in advance!
Best Regards,
Vivian
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
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
2008 Feb 25
0
logLik calculation in gls (nlme)
I'm getting some odd results computing log-likelihoods
with gls using splines with increasing degrees of freedom --
the deviance *increases* substantially with increasing df.
(Since spline models with increasing df aren't nested, it
need not decline monotonically but I would expect it to
have a decreasing trend!)
I may just be confused, but I *think* the issue is somewhere
within the
2006 Aug 25
1
R.squared in Weighted Least Square using the Lm Function
Hello all,
I am using the function lm to do my weighted least
square regression.
model<-lm(Y~X1+X2, weight=w)
What I am confused is the r.squared.
It does not seem that the r.squared for the weighted
case is an ordinary 1-RSS/TSS.
What is that precisely?
Is the r.squared measure comparable to that obtained
by the ordinary least square?
<I also notice that
model$res is the unweighted
2004 Nov 08
2
Nonlinear weighted least squares estimation
Hi there,
I'm trying to fit a growth curve to some data and need to use a weighted least squares estimator to account for heteroscedasticity in the data. A weights argument is available in nls that would appear to be appropriate for this purpose, but it is listed as 'not yet implemented'. Is there another package which could implement this procedure?
Regards,
Robert Brown
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
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 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
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
2008 Jul 24
0
Problem with GLS dwtest function
Hi,
I want to test for independence in my GLS model fitp2, but when I try to use the
dwtest function in the lmtest library, I get the error message "Error in
terms.default(formula) : no terms component".
The model and data set are below. Any suggestions would be really helpful!
Thanks a lot in advance,
M. Grace
fitp2:
2009 Feb 04
0
help with binary outcome
conducted a training with 2 training groups and one control-group (TG: Training Groups 1-3 in my data). After that training I checked every week within 4 weeks (Zeit= 1-4 in my data), if the participants used the training skills (FLEXPV). unfortunately I didnŽt use any real scale for this item, so it´s only binary coded 0/1 0=not put in practice 1=put in practice.
I´m interessted if there are
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
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
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]]
2012 Sep 19
0
Discrepancies in weighted nonlinear least squares
Dear all,
I encounter some discrepancies when comparing the deviance of a weighted and
unweigthed model with the AIC values.
A general example (from 'nls'):
DNase1 <- subset(DNase, Run == 1)
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
This is the unweighted fit, in the code of 'nls' one can see that 'nls'
generates a vector
2011 Apr 26
1
Least Squares Method
Hi everyone,
I am running the 'gls' command (least squares method) for a number of data
out of which many are zeros. I strongly believe that the output is wrong and
I think that this is due to the large number of zero values included in my
dataset.
I would like to ask if there is a command that would allow me to run the gls
command disregarding all the zero values?
Thank you in
2012 Oct 19
2
Which package/function for solving weighted linear least squares with inequality and equality constraints?
Dear All,
Which package/function could i use to solve following linear least square
problem?
A over determined system of linear equations is given. The nnls-function may
would be a possibility BUT:
The solving is constrained with
a inequality that all unknowns are >= 0
and a equality that the sum of all unknowns is 1
The influence of the equations according to the solving process is
2006 Dec 11
1
Weighted averaging partial least squares regression
Hello,
is it possible in R to calculate a Weighted averaging partial least
squares regression? I'm not firm in statistics and didn't found anything
about weighted averaging in combination with PLS in the help archives.
Or is it possible to develop a workaround with the pls-package?
thanks for help in advance
Andreas Plank
--
_____________________________________________
Dipl. Biol.
2010 Jan 28
3
weighted least squares vs linear regression
I need to find out the difference between the way R calculates weighted
regression and standard regression.
I want to plot a 95% confidence interval around an estimte i got from least
squares regression.
I cant find he documentation for this
ive looked in
?stats
?lm
?predict.lm
?weights
?residuals.lm
Can anyone shed light?
thanks
Chris.
--
View this message in context: