search for: bycountry

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

Did you mean: mycountry
2010 Jul 28
2
Out-of-sample predictions with boosting model
...ake in-sample predictions: # data has following columns: country year month y x1 x2 x3 dat = read.csv(data.csv) # Create function that estimates model, produces in-sample predictions bbox = function(df) { blackbox = mboost(y ~ x1 + x2 + x3) predict(blackbox) } # Use lapply to estimate by country bycountry = lapply(split(dat, dat$country), bbox) So that in the end I have an object bycountry that contains the in-sample predictions of the model, estimated for each country separately. What I would like to do is take this model and estimate it for each country using some initial data. I.e., estimate Au...