Gary King Homepage Previous: Value Up: YOURCAST: Software for Simultaneous Next: Bibliography

Example

One data object is included with YourCast and is available by running dta<-dataobj(). Here is an example run, using the least squares regression model (the default):

library(YourCast)
dta <- dataobj()     # loads in data object included with YourCast
names(dta) 
y.out <- yourcast(log(allc/population) ~ gdp^2 + tobacco + time, dataobj=dta)
names(y.out)         # see available output values, accessible as y.out$...
Continuing with the example, we can run the same specification and data with the MAP model as
y.out <- yourcast(log(allc/population) ~ gdp^2 + tobacco + time, dataobj=dta,
+                 model="MAP")
or, if we have run one of the other models first, as above, we could instead use the simpler form by dropping the formula and data object:
y.out2 <- yourcast(model="map")
This simpler form also uses some processing performed during the previous run and so is faster as well.

We can also change some other modeling options:

y.out2 <- yourcast(model="map", Hct.sigma=NA, Hat.sigma=NA)



Gary King 2009-07-13