[R] How to select a reasonable shrinkage coefficient in stepplr?

2008-01-01 Thread Tirthadeep

Dear R-users,

I am using stepplr for L2 regularized logistic regression. Since number of
attribute is too large i discarded interaction terms. Everything is fine but
only problem i have faced that i cannot choose a good shrinkage coefficient
(lambda). If CV is the best way to estimate, can you please elaborately tell
me how to select lambda in stepplr using CV? Except CV is there any other
procedure available?

Thanks. 
-- 
View this message in context: 
http://www.nabble.com/How-to-select-a-reasonable-shrinkage-coefficient-in-stepplr--tp14573761p14573761.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Algorithm for penalized regression in design package

2008-01-02 Thread Tirthadeep


Dear R-users,

I'm using lrm() in from the design package for l2-regularized logistic
regression.

Does anyone know which algorithm lrm() uses for this?

Thanks, 
Tirtha
-- 
View this message in context: 
http://www.nabble.com/Algorithm-for-penalized-regression-in-design-package-tp14585913p14585913.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Algorithm for penalized regression in design package

2008-01-02 Thread Tirthadeep

Dear R-users,

I'm using lrm() in from the design package for l2-regularized logistic
regression.

Does anyone know which algorithm lrm() uses for this? An article by Cessie 
and Houwelingen (Ridge estimators in logistic regression; Applied
Statistics, 1992) is cited in the reference manual. Is this the source
article? If not kindly refer the source article. 

Thanks,
Tirtha
-- 
View this message in context: 
http://www.nabble.com/Algorithm-for-penalized-regression-in-design-package-tp14585916p14585916.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 'Best penalty' in design package

2008-01-25 Thread Tirthadeep


Dear Users,

In case of ridge logistic regression, i want to calculate the optimum
penalty using aic and bic criteria. Here is the sample code:

fit <- lrm(RES ~CAT01+NUM01+NUM02+CAT02+CAT03+CAT04+NUM03+CAT05+CAT06+NUM04+
CAT07+CAT08+NUM05+NUM06, data = train.data, x = TRUE, y = TRUE)
pentrace(fit, penalty = list(seq(.001, 5, by=.1)))

output:

Best penalty:

 penalty   df
   1.001 13.26012

Var1   df aic  bicaic.c
1  0.001 13.99894 337.7431 279.2273 336.8458
2  0.101 13.89814 337.9293 279.8348 337.0446
3  0.201 13.80665 338.0721 280.3600 337.1988
4  0.301 13.72260 338.1815 280.8208 337.3186
5  0.401 13.64461 338.2646 281.2299 337.4114
6  0.501 13.57167 338.3268 281.5970 337.4824
7  0.601 13.50297 338.3718 281.9292 337.5358
8  0.701 13.43791 338.4027 282.2320 337.5746
9  0.801 13.37600 338.4218 282.5099 337.6011
10 0.901 13.31685 338.4309 282.7663 337.6173
11 1.001 13.26012 338.4316 283.0040 337.6248
12 1.101 13.20556 338.4249 283.2254 337.6246
13 1.201 13.15295 338.4119 283.4323 337.6178
14 1.301 13.10208 338.3933 283.6264 337.6053
15 1.401 13.05282 338.3699 283.8090 337.5876
16 1.501 13.00501 338.3422 283.9811 337.5655
17 1.601 12.95854 338.3107 284.1438 337.5394
...
...

I can't understand what does it mean by 'best penalty'. The aic and bic
values corresponding to the best penalty are not minimum. Please clarify.

Tirtha
-- 
View this message in context: 
http://www.nabble.com/%27Best-penalty%27-in-design-package-tp15082866p15082866.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 'Best penalty' in design package

2008-01-25 Thread Tirthadeep

Dear Users,

In case of ridge logistic regression, i want to calculate the optimum
penalty using aic and bic criteria. Here is the sample code:

fit <- lrm(RES ~CAT01+NUM01+NUM02+CAT02+CAT03+CAT04+NUM03+CAT05+CAT06+NUM04+
CAT07+CAT08+NUM05+NUM06, data = train.data, x = TRUE, y =
TRUE)
pentrace(fit, penalty = list(seq(.0001, 5, by=.01)))

Best penalty:

 penalty   df
  1.0501 13.23308

  Var1   df aic   bic   aic.c
1   0.0001 13.99989 337.7412 279.2214 336.8438
2   0.0101 13.98932 337.7622 279.2866 336.8661
3   0.0201 13.97886 337.7826 279.3507 336.8878
4   0.0301 13.96851 337.8025 279.4139 336.9090
5   0.0401 13.95827 337.8218 279.4760 336.9297
6   0.0501 13.94814 337.8407 279.5372 336.9498
7   0.0601 13.93812 337.8591 279.5975 336.9694
8   0.0701 13.92819 337.8769 279.6569 336.9885
9   0.0801 13.91837 337.8943 279.7153 337.0071
10  0.0901 13.90864 337.9113 279.7729 337.0253
11  0.1001 13.89901 337.9278 279.8297 337.0430
12  0.1101 13.88947 337.9439 279.8857 337.0603
13  0.1201 13.88002 337.9595 279.9408 337.0771
14  0.1301 13.87065 337.9748 279.9952 337.0935
15  0.1401 13.86138 337.9896 280.0488 337.1095
16  0.1501 13.85219 338.0041 280.1017 337.1252
17  0.1601 13.84308 338.0182 280.1539 337.1404
18  0.1701 13.83405 338.0319 280.2053 337.1552
19  0.1801 13.82511 338.0452 280.2561 337.1697
20  0.1901 13.81623 338.0583 280.3062 337.1838
21  0.2001 13.80744 338.0709 280.3556 337.1976
22  0.2101 13.79872 338.0833 280.4044 337.2110
23  0.2201 13.79007 338.0953 280.4526 337.2241
...
...

I can't understand what does it mean by 'best penalty'. The aic and bic
values corresponding to the best penalty are not minimum. Please clarify.

Tirtha
-- 
View this message in context: 
http://www.nabble.com/%27Best-penalty%27-in-design-package-tp15082883p15082883.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Stepwise logistic model selection using Cp and BIC criteria

2007-09-16 Thread Tirthadeep

Hi,

Is there any package for logistic model selection using BIC and Mallow's Cp
statistic? If not, then kindly suggest me some ways to deal with these
problems.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Stepwise-logistic-model-selection-using-Cp-and-BIC-criteria-tf4464430.html#a12729613
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] glmpath error

2007-09-19 Thread Tirthadeep


Hi,

I am using glampath package for L1 regularized logistic regression. I got
the following error messege.

> model.fit <- glmpath(train.data[,1:20], train.data$RES, family=binomial)
Error in one %*% x : requires numeric matrix/vector arguments

where train.data is a 700X21 matrix and 21st column in response (RES).

Please clarify!!!

Thanks
-- 
View this message in context: 
http://www.nabble.com/glmpath-error-tf4480056.html#a12774607
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] glmpath error

2007-09-19 Thread Tirthadeep

Then what is the solution?




Duncan Murdoch-2 wrote:
> 
> Tirthadeep wrote:
>> Hi,
>>
>> I am using glampath package for L1 regularized logistic regression. I got
>> the following error messege.
>>
>>   
>>> model.fit <- glmpath(train.data[,1:20], train.data$RES, family=binomial)
>>> 
>> Error in one %*% x : requires numeric matrix/vector arguments
>>
>> where train.data is a 700X21 matrix and 21st column in response (RES).
>>   
> If it is a matrix, then train.data$RES won't work.  That column 
> selection method only works for data frames,
> because they are lists, and matrices aren't.
> 
> Duncan Murdoch
>> Please clarify!!!
>>
>> Thanks
>>
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/glmpath-error-tf4480056.html#a12775820
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] glmpath: how to choose best lambda

2007-09-23 Thread Tirthadeep


Hi all,

I am using glampath package for L1 regularized logistic regression. I have
read the article " L1 regularization path algorithm for GLM" by park and
Hastie (2006). One thing I can't understand that how to find best lambda for
my prediction. I want to use that lambda for the prediction not the entire
set.

thanks.
-- 
View this message in context: 
http://www.nabble.com/glmpath%3A-how-to-choose-best-lambda-tf4505338.html#a12849013
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.