search for: yusa

Displaying 1 result from an estimated 1 matches for "yusa".

Did you mean: usa
2007 Jan 29
6
Loop with string variable AND customizable "summary" output
...my research and I have two questions about it: 1) is it possible to create a loop using a string, instead of a numeric vector? I have in mind a specific problem: Suppose you have 2 countries: UK, and USA, one dependent (y) and one independent variable (y) for each country (vale a dire: yUK, xUK, yUSA, xUSA) and you want to run automatically the following regressions: for (i in c("UK","USA")) output{i}<-summary(lm(y{i} ~ x{i})) In other words, at the end I would like to have two objects as output: "outputUK" and "outputUSA", which contain respe...