search for: reweighting

Displaying 20 results from an estimated 48 matches for "reweighting".

Did you mean: resighting
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
2005 Dec 22
1
Huber location estimate
We have a choice when calculating the Huber location estimate: > set.seed(221205) > y <- 7 + 3*rt(30,1) > library(MASS) > huber(y)$mu [1] 5.9117 > coefficients(rlm(y~1)) (Intercept) 5.9204 I was surprised to get two different results. The function huber() works directly with the definition whereas rlm() uses iteratively reweighted least squares. My surprise is
2008 Jul 23
3
maximum likelihood method to fit a model
Dear R users, I use the glm() function to fit a generalized linear model with gamma distribution function and log link. I have read in the help page that the default method used by R is "glm.fit" (iteratively reweighted least squares, IWLS). Is it possible to use maximum likelihood method? Thanks Silvia Narduzzi Dipartimento di Epidemiologia ASL RM E Via di S. Costanza, 53 00198
2005 Jan 27
2
Results of MCD estimators in MASS and rrcov
Hi! I tested two different implementations of the robust MCD estimator: cov.mcd from the MASS package and covMcd from the rrcov package. Tests were done on the hbk dataset included in the rrcov package. Unfortunately I get quite differing results -- so the question is whether this differences are justified or an error on my side or a bug? Here is, what I did: > require(MASS) >
2013 Nov 06
3
Nonnormal Residuals and GAMs
Greetings, My question is more algorithmic than prectical. What I am trying to determine is, are the GAM algorithms used in the mgcv package affected by nonnormally-distributed residuals? As I understand the theory of linear models the Gauss-Markov theorem guarantees that least-squares regression is optimal over all unbiased estimators iff the data meet the conditions linearity,
2007 Dec 18
2
"gam()" in "gam" package
R-users E-mail: r-help@r-project.org I have a quenstion on "gam()" in "gam" package. The help of gam() says: 'gam' uses the _backfitting algorithm_ to combine different smoothing or fitting methods. On the other hand, lm.wfit(), which is a routine of gam.fit() contains: z <- .Fortran("dqrls", qr = x * wts, n = n, p = p, y = y *
2013 Apr 24
2
Trouble Computing Type III SS in a Cox Regression
I should hope that there is trouble, since "type III" is an undefined concept for a Cox model. Since SAS Inc fostered the cult of type III they have recently added it as an option for phreg, but I am not able to find any hints in the phreg documentation of what exactly they are doing when you invoke it. If you can unearth this information, then I will be happy to tell you whether
2004 Jul 03
2
DSTEIN error (PR#7047)
Full_Name: Stephen Weigand Version: 1.9.0 OS: Mac OS X 10.3.4 Submission from: (NULL) (68.115.89.235) When running an iteratively reweighted least squares program R crashes and the following is written to the console.app (when using R GUI) or to stdout (when using R from the command line): Parameter 5 to routine DSTEIN was incorrect Mac OS BLAS parameter error in DSTEIN, parameter #0,
2001 Oct 26
2
glim and gls
Hello, I would like to know if there is any package that allow us to fit Generalized Linear Models via Maximum Likelihood and Linear Models using Generalized Least Squarse in R as the functions glim and gls, respectively, from S-Plus. Also, anybody know if there is any package that fit Log-Linear Models using Generalized Least Squares? Any help will be very useful. Thanks, -- Frederico
2005 Aug 10
2
Exponential, Weibull and log-logistic distributions in glm()
Dear R-users! I would like to fit exponential, Weibull and log-logistic via glm() like functions. Does anyone know a way to do this? Bellow is a bit longer description of my problem. Hm, could family() be adjusted/improved/added to allow for these distributions? SAS procedure GENMOD alows to specify deviance and variance functions to help in such cases. I have not tried that option and I do not
2010 Oct 12
1
GLM Gamma Regression error message in R
Dear Madam/Sir This may be quite a long shot... By way of intro, I am a masters student in actuarial science at the University of Cape Town, and I am doing a project in R on some healthcare cost data. During my coding in R I encountered an error message, which I then googled, but I am still unable to resolve the issue. I would like to please ask if and how it is possible to resolve the problem
2007 Dec 04
2
weighted Cox proportional hazards regression
I'm getting unexpected results from the coxph function when using weights from counter-matching. For example, the following code produces a parameter estimate of -1.59 where I expect 0.63: d2 = structure(list(x = c(1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1), wt = c(5, 42, 40, 4, 43, 4, 42, 4, 44, 5, 38, 4, 39, 4, 4, 37, 40, 4, 44, 5, 45, 5, 44, 5), riskset =
2007 Nov 21
1
equivalent of Matlab robustfit?
Hi, I've been using the Matlab robustfit function for linear regressions where I suspect some data points are outliers. Is there an equivalent function in R? Take care, Darren PS, This is the Matlab help on robustfit: >> help robustfit ROBUSTFIT Robust linear regression B = ROBUSTFIT(X,Y) returns the vector B of regression coefficients, obtained by performing robust
2015 Feb 18
3
Recycling memory with a small free list
> ... with assignments inside of loops like this: > > reweight = function(iter, w, Q) { > for (i in 1:iter) { > wT = w * Q > } > } > ... before the RHS is executed, the LHS allocation would be added > to a small fixed length list of available space which is checked > before future allocations. If the same size is requested before the > next garbage
2010 Oct 21
1
Limitations and scale of R, and performance issues if and when limit reached
Hi there Thank you for everyone's help in all my previous questions. By way of intro, I am a masters student in actuarial science at the University of Cape Town, and I am doing a project in R on some healthcare cost data. Just for clarity before I embark on further research may I please ask the following. I want to take the direction of modelling healh insurance claims data with Tweedie
2015 Feb 17
0
Recycling memory with a small free list
I'm trying to improve the performance of the update loop within a logistic regression, and am struggling against the overhead of memory allocation and garbage collection. The main issue I'd like to solve is with assignments inside of loops like this: reweight = function(iter, w, Q) { for (i in 1:iter) { wT = w * Q } } If the matrix Q is large I can get a significant gain in
2007 Mar 20
1
How does glm(family='binomial') deal with perfect sucess?
Hi all, Trying to understand the logistic regression performed by glm (i.e. when family='binomial'), and I'm curious to know how it treats perfect success. That is, lets say I have the following summary data x=c(1,2,3,4,5,6) y=c(0,.04,.26,.76,.94,1) w=c(100,100,100,100,100,100) where x is y is the probability of success at each value of x, calculated across w observations.
2008 Jan 14
1
[Off Topic] searching for a quote
Dear community, I'm trying to track down a quote, but can't recall the source or the exact structure - not very helpful, I know - something along the lines that: 80% of [applied] statistics is linear regression ... ? Does this ring a bell for anyone? Thanks, Andrew -- Andrew Robinson Department of Mathematics and Statistics Tel: +61-3-8344-9763 University of
2006 Jan 25
1
About lmer output
Dear R users: I am using lmer fo fit binomial data with a probit link function: > fer_lmer_PQL<-lmer(fer ~ gae + ctipo + (1|perm) -1, + family = binomial(link="probit"), + method = 'PQL', + data = FERTILIDAD, + msVerbose= True) The output look like this: > fer_lmer_PQL Generalized linear mixed model fit
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