Hi All, Its a bit of a beginners question I'm afraid. I have a looped stepwise regression (using MASS and StepAIC) to take random predictors out of the total number. For this example a random sample of 5 out of a total of 20. The loop will continue until all combinations of variables have been run through the loop.
The output from each loop can be derived from taking the significant (p) coefficients from the summary command, and coding them '1' (if <0.05) or '0' (if >0.05), and producing a table of 5 columns for each of the predictors entered. The table produced in the loop is much smaller than the input table. Is there a way to produce a results table using the original column titles of the input table which can be matched to the subset predictors table, where if the variable was not in the subset its row value is 'NA'? I hope that makes sense. Cheers In advance, Matt -- View this message in context: http://r.789695.n4.nabble.com/Adding-rows-to-a-table-with-a-loop-tp3933634p3933634.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.