similar to: Step and AIC

Displaying 20 results from an estimated 4000 matches similar to: "Step and AIC"

2010 Jan 18
2
Rotating pca scores
Dear Folks I need to rotate PCA loadings and scores using R. I have run a pca using princomp and I have rotated PCA results with varimax. Using varimax R gives me back just rotated PC loadings without rotated PC scores. Does anybody know how I can obtain/calculate rotated PC scores with R? Your kindly help is appreciated in advance Francesca [[alternative HTML version deleted]]
2011 Feb 03
1
glmnet with binary predictors
Hi Everybody! I must start with a declaration that I am a sparse user of R. I am creating a credit scorecard using a dataset which has a variable depicting actual credit history (good/bad) and 41 other variables of yes/no type. The procedure I am asked to follow is to use a penalized logistic procedure for variable selection. I have located the package "glmnet" which gives the complete
2011 Jan 24
2
Implementing step-wise linear regression
Dear R fans, I am trying to do step-wise linear regression using the F-test to decide which variables to admit. Ewout Steyerberg suggests using the F-test for this purpose. I first build a model using no variables using lm(y ~ 1) and then using one variable that is a strong predictor using lm(y ~ x). When I call var.test on these two models, I do not get a significant p-value—0.07. But a
2012 Apr 14
2
master thesis
Hi, For my master thesis I have 24 micro-plots on which I did measurements during 3 months. The measurements were: - Rainfall and runoff events throughout 3monts (runoff being dependant on the rainfall, a coefficient (%) has been made per rainfall event and per 3 months) - Soil texture (3 different textures were differentiated) - Slope (3 classes of slopes) - Stoniness (one time measurement)
2013 Mar 14
1
Elasticnet - Cross validation problem
Hello, I am attempting to use elasticnet to classify a number of documents. The features are words. The data is coded into a matrix with each document as a row and each word as a column. The data is binary, with {0,1} indicating the presence of a word. I want to use the cross validation function of elasticnet (cv.enet). However, when the code selects a random subset of the data for a given
2009 Mar 17
1
Double Cross validation for LASSO
Dear R user, I am looking for a code on double cross validation in LASSO , one for optimizing the parameter and other one is for MSEP. If any one have it, please foroward to me. I am using different package like LARS, chemometric etc. Thanks in advance Alex [[alternative HTML version deleted]]
2011 Jun 06
1
Lasso for k-subset regression
Dear R-users I'm trying to use lasso in lars package for subset regression, I have a large matrix of size 1000x100 and my aim is to select a subset k of the 100 variables. Is there any way in lars to fix the number k (i.e. to select the best 10 variables) library(lars) aa=lars(X,Y,type="lasso",max.steps=200) plot(aa,plottype="Cp") aa$RSS which.min(aa$RSS)
2012 May 25
2
Collecting results of a test with array
Dear contributors I have tried this experiment: x<-c() for (i in 1:12){ x[i]<-list(cbind(x1[i],x2[i])) #this is a list of 12 couples of time series I am using to perform a test } # that compares them 2 by 2 # ################# #trace statistic test<-data.frame() cval<-array( , dim=c(2,3,12)) for (i in 2:12){ for (k in 1:2){ for (j in 1:3){ result[k,j,i]<-
2012 Mar 01
1
GLM with regularization
Hello, Thank you for probably not so new question, but i am new to R. Does any of packages have something like glm+regularization? So far i see probably something close to that as a ridge regression in MASS but I think i need something like GLM, in particular binomial regularized versions of polynomial regression. Also I am not sure how some of the K-fold crossvalidation helpers out there
2011 Oct 03
2
Merge two data frames and find common values and non-matching values
Hi, I am trying to find a function to match two data frames of different lengths for one field only. So, for example, df1 is: Name Position location francesca A 75 cristina B 36 And df2 is: location Country 75 UK 56 Austria And I would like to match on "Location" and the output to be something like: Name Position Location Match francesca A 75 1 cristina B 36 0 I have tried with
2011 Jul 27
3
Reorganize(stack data) a dataframe inducing names
Dear Contributors, thanks for collaboration. I am trying to reorganize data frame, that looks like this: n1.Index Date PX_LAST n2.Index Date.1 PX_LAST.1 n3.Index Date.2 PX_LAST.2 1 NA 04/02/07 1.34 NA 04/02/07 1.36 NA 04/02/07 1.33 2 NA 04/09/07 1.34 NA 04/09/07
2012 Jan 20
3
Istalling Ruby 1.9.2
I just installed 1.9.2 on my 2nd machine, but after I installed I checked the version with ruby -v and it sent me 1.8.7 Here''s the terminal output...anyone know what''s wrong (I have RVM installed): Francescas-MacBook-Air:~ fkrihely$ rvm install 1.9.2 Fetching yaml-0.1.4.tar.gz to /Users/fkrihely/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/fkrihely/.rvm/src Configuring
2017 Oct 19
0
Select part of character row name in a data frame
(Re-)read the discussion of indexing (both `[` and `[[`) and be sure to get clear on the difference between matrices and data frames in the Introduction to R document that comes with R. There are many ways to create numeric vectors, character vectors, and logical vectors that can then be used as indexes, including the straightforward way: df[ c( "Unique to strat ", "Unique
2012 May 18
3
How to fix indeces in a loop
Dear Contributors, I have an easy question for you which is puzzling me instead. I am running loops similar to the following: for (i in c(100,1000,10000)){ print((mean(i))) #var<-var(rnorm(i,0,1)) } This is what I obtain: [1] 100 [1] 1000 [1] 10000 In this case I ask the software to print out the result, but I would like to store it in an object. I have tried a second loop, because if I
2013 Jan 27
2
Loops
Dear Contributors, I am asking help on the way how to solve a problem related to loops for that I always get confused with. I would like to perform the following procedure in a compact way. Consider that p is a matrix composed of 100 rows and three columns. I need to calculate the sum over some rows of each column separately, as follows: fa1<-(colSums(p[1:25,])) fa2<-(colSums(p[26:50,]))
2017 Oct 19
2
Select part of character row name in a data frame
Thanks a lot, so simple so efficient! I will study more the grep command I did not know. Thanks! Francesca Pancotto > Il giorno 19 ott 2017, alle ore 12:12, Enrico Schumann <es at enricoschumann.net> ha scritto: > > df[grep("strat", row.names(df)), ] [[alternative HTML version deleted]]
2013 Jul 06
1
problem with BootCV for coxph in pec after feature selection with glmnet (lasso)
Hi, I am attempting to evaluate the prediction error of a coxph model that was built after feature selection with glmnet. In the preprocessing stage I used na.omit (dataset) to remove NAs. I reconstructed all my factor variables into binary variables with dummies (using model.matrix) I then used glmnet lasso to fit a cox model and select the best performing features. Then I fit a coxph model
2010 Jul 08
1
glmnet - choosing the number of features
Hi, I am trying to use the glmnet package to do some simple feature selection. However, I would ideally like to be able to specify the number of features to return (the glmnet package, as far as I can tell, only allows specification of a regularization parameter, lambda, that in turn returns a model with a specific number of non-zero features). Is there a straightforward way of calculating the
2004 Sep 20
3
montecarlo simulation
Hy! I would like to know how run a montecarlo simulation with R. Thank you!!!! Francesca Matalucci __________________________________________________________________ Accesso Internet Gratis per utenti Excite! Attivalo subito! http://www.excite.it/hitech/accesso Il Mio Excite. Personalizza la tua Home page Excite come vuoi tu! http://www.excite.it AAA/Relazioni. Sfoglia gli annunci e trova la
2004 Mar 23
1
help on data.frames/data.entry
Dear R-help, I have a matrix D of dimensions 200 x 26; rows are my cases and columns are my variables. I would like to create a data.frame "DF" with row.names= myrownames (this is a vector of characters of length 200) and column names "mycolnames" (a vector of characters of length 26). I could find the option in data.frame for naming rows, but not for naming columns. So I