Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced OLS for copulaCorrection single continuous endogenous regressor #52

Open
pschil opened this issue May 23, 2020 · 2 comments
Open
Assignees

Comments

@pschil
Copy link
Collaborator

pschil commented May 23, 2020

Currently, the case of a single continuous endogenous regressor in copulaCorrection can only be estimated using LL. Because bootstrapping with LL takes much longer it would be convenient to also provide the possibility to use enhanced OLS. As by Raluca, this would theoretically be correct as shown in the paper by Park and Gupta.

Suggested syntax: use continuousLL() and continuousOLS() to mark the regressors in favour of continuous() which should be depreciated.

This is not expected to be implemented in the near future.

@pschil pschil self-assigned this May 23, 2020
@hannesdatta
Copy link

I was skimming through the code and issues, but couldn't easily discern whether the estimation with multiple endogenous regressors is supported already. When using OLS, it should be enough to use the copula transformation function (i.e., to extract the normally-distributed and potentially endogenous part of PStar), and inserting that as an additional regressor for each potentially endogenous variable. Should be straightforward to implement. The function may be sensitive to the increment to prevent qnorm to evaluate to NA.

	make_copula <- function(x, increment = .00001) {
		if (length(unique(x))==1) return(as.numeric(rep(NA, length(x))))
		return(ifelse(ecdf(x)(x)==1, qnorm(1-increment), qnorm(ecdf(x)(x))))
		}

@Rgui
Copy link
Collaborator

Rgui commented Jan 13, 2021

Copula correction method with multiple endogenous regressors is already implemented, as explained also in the vignette: https://rdrr.io/cran/REndo/f/vignettes/REndo-introduction.Rmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants