Displaying 20 results from an estimated 30000 matches similar to: "Weighted least squares"
2004 Apr 18
2
lm with data=(means,sds,ns)
Hi Folks,
I am dealing with data which have been presented as
at each x_i, mean m_i of the y-values at x_i,
sd s_i of the y-values at x_i
number n_i of the y-values at x_i
and I want to linearly regress y on x.
There does not seem to be an option to 'lm' which can
deal with such data directly, though the regression
problem could be algebraically
2008 Jul 23
1
Questions on weighted least squares
Hi all,
I met with a problem about the weighted least square regression.
1. I simulated a Normal vector (sim1) with mean 425906 and standard deviation 40000.
2. I simulated a second Normal vector with conditional mean b1*sim1, where b1 is just a number I specified, and variance proportional to sim1. Precisely, the standard deviation is sqrt(sim1)*50.
3. Then I run a WLS regression without the
2012 Nov 21
2
Weighted least squares
Hi everyone,
I admit I am a bit of an R novice, and I was hoping someone could help me
with this error message:
Warning message:
In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra arguments weigths are just disregarded.
My equation is:
lm( Y ~ X1 + X2 + X3, weigths = seq(0.1, 1, by = 0.1))
--
View this message in context:
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
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:
2006 May 20
1
(PR#8877) predict.lm does not have a weights argument for newdata
Dear R developers,
I am a little disappointed that my bug report only made it to the
wishlist, with the argument:
Well, it does not say it has.
Only relevant to prediction intervals.
predict.lm does calculate prediction intervals for linear models from
weighted regression, so they should be correct, right?
As far as I can see they are bound to be wrong in almost all cases, if
no weights
2008 Mar 10
1
Mimicking SPSS weighted least squares
Howdy,
In SPSS, there are 2 ways to weight a least squares regression:
1. You can do it from the regression menu.
2. You can set a global weight switch from the data menu.
These two options have no, in my experience, been equivalent.
Now, when I run lm in R with the weights= switch set accordingly, I
get the same set of results you would see with option #1 in SPSS.
Does anybody know how to
2011 Jan 15
1
Weighted least squares regression for an exponential decay function
Hello,
I have a data set of data which is best fit by an exponential decay
function. I would like to use a nonlinear weighted least squares regression.
What function should I be using?
Thank you!
[[alternative HTML version deleted]]
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.
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
2007 Jun 11
0
Weighted least squares
As John noted, there are different kinds of weights, and
different terminology:
* inverse-variance weights (accuracy weights)
* case weights (frequencies, counts)
* sampling weights (selection probability weights)
I'll add:
* inverse-variance weights, where var(y for observation) = 1/weight
(as opposed to just being inversely proportional to the weight)
* weights used as part of an
2007 Mar 13
3
inconsistent behaviour of add1 and drop1 with a weighted linear model
Dear R Help,
I have noticed some inconsistent behaviour of add1 and drop1 with a
weighted linear model, which affects the interpretation of the results.
I have these data to fit with a linear model, I want to weight them by
the relative size of the geographical areas they represent.
_________________________________________________________________________________________
> example
2009 Jul 01
1
Iteratively Reweighted Least Squares of nonlinear regression
Dear all,
When doing nonlinear regression, we normally use nls if e are iid normal.
i learned that if the form of the variance of e is not completely known,
we can use the IRWLS (Iteratively Reweighted Least Squares )
algorithm:
for example, var e*i =*g0+g1*x*1
1. Start with *w**i = *1
2. Use least squares to estimate b.
3. Use the residuals to estimate g, perhaps by regressing e^2 on
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
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
2007 May 31
3
Problem with Weighted Variance in Hmisc
The function wtd.var(x,w) in Hmisc calculates the weighted variance of x
where w are the weights. It appears to me that wtd.var(x,w) = var(x) if all
of the weights are equal, but this does not appear to be the case. Can
someone point out to me where I am going wrong here? Thanks.
Tom La Bone
[[alternative HTML version deleted]]
2007 Apr 12
1
LME: internal workings of QR factorization
Hi:
I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For
2010 Feb 10
2
Total least squares linear regression
Dear all,
After a thorough research, I still find myself unable to find a function
that does linear regression of 2 vectors of data using the "total least
squares", also called "orthogonal regression" (see :
http://en.wikipedia.org/wiki/Total_least_squares) instead of the
"ordinary least squares" method. Indeed, the "lm" function has a
2007 Mar 12
4
meta-regression, MiMa function, and R-squared
Dear Wolfgang Viechtbauer and list members:
I have discovered your "MiMa" function for fitting meta-analytic
mixed-effects models through an earlier discussion on this list. I think
it is extremely useful and fills an important gap. In particular, since
it is programmed so transparently, it is easy to adapt it for one's own
needs. (For example, I have found it easy to identify