similar to: penalized regression analysis

Displaying 20 results from an estimated 100 matches similar to: "penalized regression analysis"

2010 Oct 12
2
repeating an analysis
Hi All, I have to say upfront that I am a complete neophyte when it comes to programming. Nevertheless I enjoy the challenge of using R because of its incredible statistical resources. My problem is this .........I am running a regression tree analysis using "rpart" and I need to run the calculation repeatedly (say n=50 times) to obtain a distribution of results from which I will pick
2010 Nov 19
2
Ekiga can register but not my IP phone
Hello, I have a Sip phone (Siemens C470IP) which works perfectly with different VoIP providers (iptel, betamax, ovh...). It also worked well with my testing server (ubuntu and inside the LAN). But now the problem i have is that the hardphone doesn't connect to my dedicated server (debian lenny / Asterisk 1.6.2.13). The strange thing is that ekiga can connect to the same asterisk server with
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
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
2009 May 16
1
maxLik pakage
Hi all; I recently have been used 'maxLik' function for maximizing G2StNV178 function with gradient function gradlik; for receiving this goal, I write the following program; but I have been seen an error  in calling gradient  function; The maxLik function can't enter gradlik function (definition of gradient function); I guess my mistake is in line ******** ,that the vector  ‘h’ is
2008 Sep 11
0
Loop for the convergence of shape parameter
Hello, The likelihood includes two parameters to be estimated: lambda (=beta0+beta1*x) and alpha. The algorithm for the estimation is as following: 1) with alpha=0, estimate lambda (estimate beta0 and beta1 via GLM) 2) with lambda, estimate alpha via ML estimation 3) with updataed alpha, replicate 1) and 2) until alpha is converged to a value I coded 1) and 2) (it works), but faced some
2009 Jan 05
1
transform R to C
Dear R users, i would like to transform the following function from R-code to C-code and call it from R in order to speed up the computation because in my other functions this function is called many times. `dgcpois` <- function(z, lambda1, lambda2) { `f1` <- function(alpha, lambda1, lambda2) return(exp(log(lambda1) * (alpha - 1) - lambda2 * lgamma(alpha))) `f2` <-
2006 Jul 07
1
convert ms() to optim()
How to convert the following ms() in Splus to Optim in R? The "Calc" function is also attached. ms(~ Calc(a.init, B, v, off, d, P.a, lambda.a, P.y, lambda.y, 10^(-8), FALSE, 20, TRUE)$Bic, start = list(lambda.a = 0.5, lambda.y = 240), control = list(maxiter = 10, tol = 0.1)) Calc <- function(A.INIT., X., V., OFF., D., P1., LAMBDA1., P2., LAMBDA2., TOL., MONITOR.,
2008 Sep 12
1
Error in "[<-"(`*tmp*`, i, value = numeric(0)) :
I use "while" loop but it produces an errro. I have no idea about this. Error in "[<-"(`*tmp*`, i, value = numeric(0)) : nothing to replace with The problem description is The likelihood includes two parameters to be estimated: lambda (=beta0+beta1*x) and alpha. The algorithm for the estimation is as following: 1) with alpha=0, estimate lambda (estimate beta0
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
2017 Oct 31
0
lasso and ridge regression
Dear All The problem is about regularization methods in multiple regression when the independent variables are collinear. A modified regularization method with two tuning parameters l1 and l2 and their product l1*l2 (Lambda 1 and Lambda 2) such that l1 takes care of ridge property and l2 takes care of LASSO property is proposed The proposed method is given
2008 Sep 19
2
Error: function cannot be evaluated at initial parameters
I have an error for a simple optimization problem. Is there anyone knowing about this error? lambda1=-9 lambda2=-6 L<-function(a){ s2i2f<-(exp(-lambda1*(250^a)-lambda2*(275^a-250^a)) -exp(-lambda1*(250^a)-lambda2*(300^a-250^a))) logl<-log(s2i2f) return(-logl)} optim(1,L) Error in optim(1, L) : function cannot be evaluated at initial parameters Thank you in advance -- View this
2008 Nov 15
1
rgamma with rate as vector
Hi - I have a question about the following code from Bayesian Computation with R (Jim Albert). par(mfrow=c(2,2)) m = 500 alphas = c(5, 20, 80, 400) for (j in 1:4) { mu = rgamma(m, shape=10, rate=10) lambda1 = rgamma(m, shape=alphas[j], rate=alphas[j]/mu) lambda2 = rgamma(m, shape=alphas[j], rate=alphas[j]/mu) plot(lambda1, lambda2) title(main=paste('alpha=',
2017 Dec 08
0
Elastic net
Dear R users,? ? ? ? ? ? ? ? ? ? ? ? ? I am using "Glmnet" package in R for applying "elastic net" method. In elastic net, two penalities are applied one is lambda1 for?LASSO and lambda2 for ridge ( zou, 2005) penalty.?How can I? write the code to? pre-chose the? lambda1 for?LASSO and lambda2 for ridge without using cross-validation Thanks in advance? Tayo? [[alternative
2001 Sep 17
0
Many thanks. (Was: Supply linear constrain to optimizer)
Many thanks to those took time replied to my question. They were very helpful and I solved my problem by reparameterization. With the help of optim() the fitting procedure is very robust and insensitive to initial starting value. Once again, many thanks. Kevin -------- Original post --------- >Dear R and S users, > >I've been working on fitting finite mixture of negative
2001 Sep 14
1
Supply linear constrain to optimizer
Dear R and S users, I've been working on fitting finite mixture of negative exponential distributions using maximum likelihood based on the example given in MASS. So far I had much success in fitting two components. The problem started when I tried to extend the procedure to fit three components. More specifically, likelihood = sum( ln(c1*exp(-x/lambda1)/lambda1 + c2*exp(-x/lambda2)/lambda2
2012 Apr 13
1
R: Colouring phylogenetic tip labels and/or edges
Hi, I have reconstructed ancestral character states on a phylogeny using MuSSE in the diversitree package and plotted the character state probabilities as pie charts on the nodes. I would, however, like to colour the character states of my extant species, i.e. the tip labels, the same colours as my pie charts, such that all species in state 1 are e.g. blue, species in state 2 red and species in
2012 May 05
0
penalized quantile regression (rq.fit.lasso)
Dear all: I have a question about how to get the optimal estimate of coefficients using the penalized quantile regression (LASSO penalty in quantile regression defined in Koenker 2005). In R, I found both rq(y ~ x, method="lasso",lambda = 30) and rq.fit.lasso(x, y, tau = 0.5, lambda = 1, beta = .9995, eps = 1e-06) can give the estimates. But, I didn't find a way using either of
2005 Jan 19
1
recursive penalized regression
Hi, Few days ago I posted a question to r-sig-finance, which I thought would be an easy one. To my surprise I have received no replies, which makes me think that it is either harder than I thought, or that it makes no sense. I am reposting the message (with some modifications) on the R-help in a hope to get some leads, suggestions for alternatives, etc. My apologies to those who had seen this on
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]]