Description Usage Arguments Author(s) References See Also Examples

View source: R/Rchoice.methods.R

Plot the distribution of the conditional expectation of the random parameters or compensating variations for objects of class `Rchoice`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |

`x` |
a object of class |

`par` |
a string giving the name of the variable with random parameter, |

`effect` |
a string indicating what should be plotted: the conditional expectation of the individual coefficients " |

`wrt` |
a string indicating repect to which variable should be computed the compensating variation, |

`type` |
a string indicating the type of distribution: it can be a |

`adjust` |
bandwidth for the kernel density, |

`main` |
an overall title for the plot, |

`col` |
color for the graph, |

`breaks` |
number of breaks for the histrogram if |

`ylab` |
a title for the y axis, |

`xlab` |
a title for the x axis, |

`ind` |
a boolean. If |

`id` |
only relevant if |

`...` |
further arguments. Ignored. |

Mauricio Sarrias

Greene, W. H. (2012). Econometric analysis, Seventh Edition. Pearson Hall.

Train, K. (2009). Discrete choice methods with simulation. Cambridge university press.

`Rchoice`

for the estimation of different discrete choice models with individual parameters.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
## Not run:
## Probit Model with Random Effects and Random Parameters
data('Unions', package = 'pglm')
Unions$lwage <- log(Unions$wage)
union.ran <- Rchoice(union ~ age + exper + rural + lwage,
data = Unions[1:2000, ],
family = binomial('probit'),
ranp = c(constant = "n", lwage = "t"),
R = 10,
panel = TRUE,
index = "id",
print.init = TRUE)
## Plot the distribution of the conditional mean for lwage
plot(union.ran, par = "lwage", type = "density")
## Plot the conditional mean for the first 20 individuals
plot(union.ran, par = "lwage", ind = TRUE, id = 1:20, col = "blue")
## Plot the compensating variation
plot(union.ran, par = "lwage", effect = "cv", wrt = "rural", type = "histogram")
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.