similar to: Contrasts in Penalized Package

Displaying 20 results from an estimated 10000 matches similar to: "Contrasts in Penalized Package"

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]]
2002 Nov 07
4
Preferable contrasts?
Dear all, I'm working with Cox-regression, because data could be censored. But in this particular case not. Now I have a simple example: PRO and PRE are (0,1) coded. The response is not normal distributed. We are interested in a model which could describe interaction. But my results are depending strongly in the choose of the contrast option. It is clear that there is some dependence in
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, as I'm new in R (coming
2011 May 11
1
Help with contrasts
Hi, I need to build a function to generate one column for each level of a factor in the model matrix created on an arbitrary formula (instead of using the available contrasts options such as contr.treatment, contr.SAS, etc). My approach to this was first to use the built-in function for contr.treatment but changing the default value of the contrasts argument to FALSE (I named this function
2004 Mar 03
1
Confusion about coxph and Helmert contrasts
Hi, perhaps this is a stupid question, but i need some help about Helmert contrasts in the Cox model. I have a survival data frame with an unordered factor `group' with levels 0 ... 5. Calculating the Cox model with Helmert contrasts, i expected that the first coefficient would be the same as if i had used treatment contrasts, but this is not true. I this a error in reasoning, or is it
2008 Jun 16
1
contrasts using adonis function
Hi, Somebody knows how to make contrasts if i'm using the function adonis? Thanks.
2008 Aug 26
2
options("contrasts")
Code: > options("contrasts") $contrasts factor ordered "contr.treatment" "contr.poly" I want to change the first entry ONLY, without retyping "contr.poly". How do I do it? I have tried various possibilities and cannot get anything to work. I found out that the response to options("contrasts") has class
2006 Sep 23
1
contrasts in aov
useRs, A no doubt simple question, but I am baffled. Indeed, I think I once knew the answer, but can't recover it. The default contrasts for aov (and lm, and...) are contr.treatment and contr.poly for unordered and ordered factors, respectively. But, how does one invoke the latter? That is, in a data.frame, how does one indicate that a factor is an *ordered* factor such that
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="logistic",standardize=TRUE) pena.fit2
2005 Feb 07
3
problem with logistic regression
Hi, we try to do a logistic regression with the function glm. But we notice that this function don't give the same results as the SAS proc catmod (differents estimate given). We try to change the contrast on R system with: > options(contrasts=c(unordered="contr.SAS",ordered="contr.poly")) We also try with brlr and logistf functions. Unfortunately, the estimate
2002 Nov 07
2
Qualitative factors
Hi, I have some doubt about how qualitative factors are coded in R. For instance, I consider a response y, a quantitative factor x and a qualitative factor m at 3 levels, generated as follow : y_c(6,4,2.3,5,3.5,4,1.,8.5,4.3,5.6,2.3,4.1,2.5,8.4,7.4) x_c(3,1,3,1,2,1,4,5,1,3,4,2,5,4,3) m_gl(3,5) lm(y~x+m) Coefficients: (Intercept) x m2 m3 3.96364 0.09818
2008 Nov 10
1
question about contrast in R for multi-factor linear regression models?
Hi all, I am using "lm" to fit some anova factor models with interactions. The default setting for my unordered factors is "treatment". I understand the resultant "lm" coefficients for one factors, but when it comes to the interaction term, I got confused. > options()$contrasts unordered ordered "contr.treatment"
2009 Oct 14
1
different L2 regularization behavior between lrm, glmnet, and penalized?
The following R code using different packages gives the same results for a simple logistic regression without regularization, but different results with regularization. This may just be a matter of different scaling of the regularization parameters, but if anyone familiar with these packages has insight into why the results differ, I'd appreciate hearing about it. I'm new to
2008 Jan 05
2
Behavior of ordered factors in glm
I have a variable which is roughly age categories in decades. In the original data, it came in coded: > str(xxx) 'data.frame': 58271 obs. of 29 variables: $ issuecat : Factor w/ 5 levels "0 - 39","40 - 49",..: 1 1 1 1... snip I then defined issuecat as ordered: > xxx$issuecat<-as.ordered(xxx$issuecat) When I include issuecat in a glm model, the result
2000 Aug 13
2
Possible bug (PR#633)
2004 Jun 23
1
nlme questions (e.g., specifying group membership, changing options)
I'm trying to better understand the nlme package and have a few questions. 1.) Other than using various coding strategies (e.g., dummy coding, effect coding), is there a way to identify group membership (i.e., treatment) directly? For example, the following code will fit a two group logistic growth curve (where 'Score' is repeatedly measured over 'Time' for each of the
2009 Nov 16
2
fitting a logistic regression with mixed type of variables
Hi, I am trying to fit a logistic regression using glm, but my explanatory variables are of mixed type: some are numeric, some are ordinal, some are categorical, say If x1 is numeric, x2 is ordinal, x3 is categorical, is the following formula OK? *model <- glm(y~x1+x2+x3, family=binomial(link="logit"), na.action=na.pass)* * * *Thanks,* * * *-Jack* [[alternative HTML version
2009 Mar 17
3
Non-Linear Optimization - Query
Dear All, I couple of weeks ago, I’ve asked for a package recommendation for nonlinear optimization. In my problem I have a fairly complicated non-linear objective function subject to one non-linear equality constrain. I’ve been suggested to use the *Rdonlp2* package, but I did not get any results after running the program for 5 hrs. Is it normal to run this type of programs for hours? Also,
2010 Jul 21
1
lm: order of dropped columns
Hi all, If presented with a singular design matrix, lm drops columns to make the design matrix non-singular. What algorithm is used to select which (and how many) column(s) to drop? Particularly, given a factor, how does lm choose levels of the factor to discard? Thanks for the help. Best, Anirban [[alternative HTML version deleted]]
2005 Apr 13
2
multinom and contrasts
Hi, I found that using different contrasts (e.g. contr.helmert vs. contr.treatment) will generate different fitted probabilities from multinomial logistic regression using multinom(); while the fitted probabilities from binary logistic regression seem to be the same. Why is that? and for multinomial logisitc regression, what contrast should be used? I guess it's helmert? here is an example