Description Usage Arguments Value

A function used to estimate the reduced dimension regressions for g. The regression
can be computed using a user specified function, passed through `SL.gr`

or using
`SuperLearner`

when `length(SL.gr) == 1`

or `is.list(SL.gr)`

. There is
an error proofing of the `SuperLearner`

implementation that deals with situations where
the `NNLS`

procedure in the Super Learner ensemble fails and so the function returns
zero weights for every coefficient. In this case, the code will default to using the discrete
Super Learner; that is, the learner with lowest CV-risk.

1 2 | ```
estimategr(rg0, rg1, g0n, g1n, A0, A1, folds, validFold, Q2n, Q1n, SL.gr, abar,
return.models, tolg, verbose, ...)
``` |

`rg0` |
The "residual" for the first reduced dimension regression (on Q1n). |

`rg1` |
The "residual" for the second reduced dimension regression (on Q2n). |

`g0n` |
A |

`g1n` |
A |

`A0` |
A |

`A1` |
A |

`folds` |
Vector of cross-validation folds |

`validFold` |
Which fold is the validation fold |

`Q2n` |
A |

`Q1n` |
A |

`SL.gr` |
A |

`abar` |
A |

`return.models` |
A |

`tolg` |
A |

A list with elements g0nr, g1nr, h0nr, h1nr, and hbarnr, corresponding to the
predicted values of the reduced dimension regressions. Also included in output are the
models used to obtain these predicted values (set to `NULL`

if `return.models = FALSE`

)

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.