similar to: Weighted least squares

Displaying 20 results from an estimated 4000 matches similar to: "Weighted least squares"

2009 Nov 12
1
naive "collinear" weighted linear regression
Hi there Sorry for what may be a naive or dumb question. I have the following data: > x <- c(1,2,3,4) # predictor vector > y <- c(2,4,6,8) # response vector. Notice that it is an exact, perfect straight line through the origin and slope equal to 2 > error <- c(0.3,0.3,0.3,0.3) # I have (equal) ``errors'', for instance, in the measured responses Of course the
2007 Jul 15
1
NNET re-building the model
Hello, I've been working with "nnet" and now I'd like to use the weigths, from the fitted model, to iterpret some of variables impornatce. I used the following command: mts <- nnet(y=Y,x=X,size =4, rang = 0.1, decay = 5e-4, maxit = 5000,linout=TRUE) X is (m x n) Y is (m x 1) And then I get the coeficients by: Wts<-coef(mts) b->h1 i1->h1
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
1999 Dec 07
1
using weights in lm()
Hello! When I know the vector of the variance of the disturbances (i.e. the structure of heteroskedasticity), say Var(u_{i})=v_{i}, what is the weights I should use as argument to lm(): M <- lm(y~x,weigths=1/v) or M <- lm(y~x,weights=1/(v^0.5)) ??? In the help pages I did not find a clear answer to this question, so please could someone help me! Thanks, Wolfgang Koller
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:
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.
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]]
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
2002 Jun 27
2
large survey data set
---------- Forwarded message ---------- Hello, I am analyzing a weighted, stratified, clustered survey data set with approximately 1 million observations and 50 variables. I am new to R (I'm a Stata user), and so far couldn't find any documentation on how to handle survey data. In other words, is there a specific package to handle a combination of weigths, clusters and strata. I am also
2003 Jun 22
1
Using weighted.mean() in aggregate()
Dear R users, I have a question on using weighted.mean() while aggregating a data frame. I have a data frame with columns Sub, Length and Slope: > x[1:5,] Sub Length Slope 1 2 351.547 0.0025284969 2 2 343.738 0.0025859390 3 1 696.659 0.0015948968 4 2 5442.338 0.0026132544 5 1 209.483 0.0005304225 and I would like to calculate the weighted.mean of Slope, using Length
2007 May 08
5
Weighted least squares
Dear all, I'm struggling with weighted least squares, where something that I had assumed to be true appears not to be the case. Take the following data set as an example: df <- data.frame(x = runif(100, 0, 100)) df$y <- df$x + 1 + rnorm(100, sd=15) I had expected that: summary(lm(y ~ x, data=df, weights=rep(2, 100))) summary(lm(y ~ x, data=rbind(df,df))) would be equivalent, but
2010 Dec 07
1
please show me simple example how to plot "Distance-Weighted Least Squares" fitting
I got simple x,y pairs of data and simple scatterplot and just cannot figure how to do it , there are many examples but always there is error popping out please show me an example stripped with additional data just core of what I need to do to get this damn line -- View this message in context:
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
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
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
2009 Oct 09
2
weigths in nls (PR#13991)
Potential bug: I mistyped weights in the call ('weigths') and it did not produce any error= message. The coefs were exactly the same like without weights, so I was su= spicious and when weights(nls1) gave NULL, I saw my typo. Usually the function will say "Unused arguments", which shows you the error= , but not nls. Regards Stephen [[alternative HTML version deleted]]
2003 Jul 31
1
help with tapply and weighted.mean
Hello! I have data frame with 'weights' in one of the columns. I need to compute weighted mean on another column other factor variable and i am trying to: res<-tapply(data$k,list(data$model),weighted.mean,w=data$w,na.rm=T) and i get: Warning messages: 1: longer object length is not a multiple of shorter object length in: x * w 2: longer object length is not a multiple of shorter
2007 Feb 22
1
problem with weights on lmer function
Hi, I try to make a model using lmer, but the weigths is not accept. m1<-lmer(ocup/total~tempo+(tempo|estacao),family=binomial,weights=total) Erro em lmer(ocup/total ~ tempo + (tempo | estacao), family = binomial, : object `weights' of incorrect type I dont understand why this error, with glm this work. the total object is a vector. Any idea? Thanks Ronaldo -- God is subtle, but