search for: penal

Displaying 20 results from an estimated 553 matches for "penal".

Did you mean: pena
2007 Nov 30
1
Puzzling message: "no man files in this package"
...th install and build run to conclusion without reporting formal errors or warnings. Next, Rcmd check gives me a lot of nice OK's (even: * checking Rd files ... OK), and then * checking Rd cross-references ... WARNING Error in Rd_db(package, lib.loc = lib.loc) : directory 'M:/R/packages/penalized.Rcheck/penalized' does not contain Rd objects Calls: <Anonymous> -> .build_Rd_xref_db -> Rd_db Execution halted Again puzzling! I get the impression that the error message is not meant for me (I'm not the one who is supposed to put Rd objects into M:/R/packages/penalized.Rc...
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="l...
2009 Oct 14
1
different L2 regularization behavior between lrm, glmnet, and penalized?
...# x = -2, p = 1/4; > # x = -1, p = 1/3; > # x = 2, p = 2/3; > # x = 3, p = 3/4. > z = c(0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1) > library(Design) > g = lrm(z ~ x) > g$coefficients Intercept x -0.2224842 0.4449685 > g = lrm(z ~ x, penalty = 1) > g$coefficients Intercept x -0.1620727 0.3241454 > library(glmnet) > g = glmnet(cbind(x), cbind(1-z, z), family = "binomial", lambda = 0, standardize = FALSE) > coef(g) 1 -0.2224843 x 0.4449687 > g = glmnet(c...
2011 May 20
1
Contrasts in Penalized Package
Hi, The "penalized" documentation says that "Unordered factors are turned into as many dummy variables as the factor has levels". This is done by a function in the package called contr.none. I'm trying to figure out how exactly is a model matrix created with this contrast option when the user c...
2009 Oct 30
0
different L2 regularization behavior between lrm, glmnet, and penalized? (original question)
Dear Robert, The differences have to do with diffent scaling defaults. lrm by default standardizes the covariates to unit sd before applying penalization. penalized by default does not do any standardization, but if asked standardizes on unit second central moment. In your example: x = c(-2, -2, -2, -2, -1, -1, -1, 2, 2, 2, 3, 3, 3, 3) z = c(0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1) You got: > g = lrm(z ~ x, penalty = 1) > g$coeff...
2005 Aug 13
1
Penalized likelihood-ratio chi-squared statistic: L.R. model for Goodness of fit?
Dear R list, From the lrm() binary logistic model we derived the G2 value or the likelihood-ratio chi-squared statistic given as L.R. model, in the output of the lrm(). How can this value be penalized for non-linearity (we used splines in the lrm function)? lrm.iRVI <- lrm(arson ~ rcs(iRVI,5), penalty=list(simple=10,nonlinear=100,nonlinear.interaction=4)) This didn’t work properly. The aim is to obtain a value that can be used to compare the goodness of fit of the differen...
2010 Oct 25
0
penalized regression analysis
Hi All, I am using the package 'penalized' to perform a multiple regression on a dataset of 33 samples and 9 explanatory variables. The analysis appears to have performed as outlined and I have ended up with 4 explanatory variables and their respective regression coefficients. What I am struggling to understand is where do I get th...
2010 Aug 04
5
Question regarding significance of a covariate in a coxme survival model
...urv) Which provides the following output: ------------------------------------------------- > thorp1 Cox mixed-effects model fit by maximum likelihood Data: bip.surv events, n = 99, 189 (3 observations deleted due to missingness) Iterations= 10 54 NULL Integrated Penalized Log-likelihood -479.0372 -467.3549 -435.2096 Chisq df p AIC BIC Integrated loglik 23.36 3.00 3.3897e-05 17.36 9.58 Penalized loglik 87.66 47.27 3.2374e-04 -6.88 -129.54 Model: Surv(age_sym1, sym1) ~ lifedxm + (1 | famid) Fixed coefficients...
2011 Nov 03
0
L1 penalization for proportional odds logistic regression
Dear community, I am currently attempting to perform a (L1) penalized ordinal logistic regression with proportional odds. For the moment I only found R packages allowing to perform forward or backward continuation ratio model with several penalizations. Does anyone have a clue of what R package I could use ? I am not even quite sure that penalized logistic regres...
2009 Sep 25
1
Penalized Logistic Regression - Query
Dear R users, Is there any package that I could use to perform Penalized Logistic Regression (i.e. Ridge/Lasso regularization) including also an offset term in the model (i.e. a variable with a known coefficient of 1 rather than an estimated coefficient)? I couldn't find any package that would allow using offset terms. Any guidance will help. Many thanks! Axe...
2010 Feb 16
1
penalized package for ridge regression
Dear all, I am using "penalized" package for "Ridge" regression. I do not know how can I get regression coefficients using that package . Please help me. Thanks -- Linda Garcia [[alternative HTML version deleted]]
2009 Sep 26
2
Design Package - Penalized Logistic Reg. - Query
Dear R experts, The lrm function in the Design package can perform penalized (Ridge) logistic regression. It is my understanding that the ridge solutions are not equivalent under scaling of the inputs, so one normally standardizes the inputs. Do you know if input standardization is done internally in lrm or I would have to do it prior to applying this function. Also, a...
2010 Mar 09
1
penalized maximum likelihood estimation and logistf
Hi, I got two questions and would really appreciate any help from here. First, is the penalized maximum likelihood estimation(Firth Type Estimation) only fit for binary response (0,1 or TRUE, FALSE)? Can it be applied to multinomial logistic regression? If yes, what's the formula for LL and U(beta_i)? Can someone point me to the right reference? Second, when I used *logistf *on a dat...
2007 May 10
2
Nonlinear constrains with optim
...hat kind of problems, but the precision of the optimal values for the parameters is sometimes far from what I need. Optim seems to be more precise, but it can only accept box-constrained optimization problems. I read in the list archives that optim can also be used with nonlinear constrains through penalizations. However, I am not familiar with the technique of penalizations. Could someone please indicate to me a site or a book to learn about that penalization technique? Thanks in advance, Paul
2009 Aug 03
1
penalized logistic regression
Hi, R users, Is there any package for penalized logistic regression with more than two response classes? I read the manual for stepPlr, but it seems it's only for binary case. Thank you, Annie [[alternative HTML version deleted]]
2010 Aug 03
1
Penalized Gamma GLM
Hi, I couldn't find a package to fit a penalized (lasso/ridge) Gamma regression model. Does anybody know any? Thanks in advance, Lars. [[alternative HTML version deleted]]
2012 Jul 09
0
firth's penalized likelihood bias reduction approach
...e, whereas 20% (4/20) of sad-mood participants presented a positive response (coded as 1) in the non-fair game, none of neutral-mood participants did so (0/20). Thus, if drawing a 2x2 (mood x response, in the non-fair game) table, there was an empty cell. I've learned that I can use Firth's penalized likelihood method for bias reduction, which could be achieved using R packages "brglm" or "logistf". However, I found the packages only deal with non-clustered data, which is not the case for my data. I included game type as a within-subject variable and mood as a between-su...
2003 Sep 14
3
Re: Logistic Regression
Christoph Lehman had problems with seperated data in two-class logistic regression. One useful little trick is to penalize the logistic regression using a quadratic penalty on the coefficients. I am sure there are functions in the R contributed libraries to do this; otherwise it is easy to achieve via IRLS using ridge regressions. Then even though the data are separated, the penalized log-likelihood has a unique ma...
2006 Apr 13
3
Penalized Splines as BLUPs using lmer?
Dear R-list, I?m trying to use the lmer of the lme4 package to fit a linear mixed model of the form Y = Xb + Zu + e and I can?t figure out how to control the covariance structure of u. I want u ~ N(0,sigma^2*I). More precisely I?m trying to smooth a curve through data using the "Penalized Splines as BLUPs" method as described in Ruppert, Wand & Carroll (2003). So I have Z = [Z1 Z2 ... Z11] where Z1,...,Z11 is a linear spline basis and X = [1 t] where t is time column in my case. I have tried various things and read a lot of the online literature but I can?t seem to fi...
2006 Feb 28
1
Collinearity in nls problem
...ated with the initial decay slope a0 (which makes sense, as the longer the delay, the more rapid the drop has to be, conditional on the data). To get over this problem, I could reparameterize the problem, but it isn't clear to me how to do this for the above model. I also thought about using a penalized least square approach, to shrink t0 and a1 towards 0. I haven't seen much on penalized least squares in a nonlinear least squares setting; is this a good way to go? Can I justifiably penalize only a0 and a1, or should I also penalize the other parameters? Thanks for any help! Simon -- Sim...