Commit Graph

50 Commits

Author SHA1 Message Date
Brian Albert Monroe 6e335369e8
Add more options to the sqsr task 2023-04-17 10:25:05 +02:00
Brian Albert Monroe 43f649099d
Add skewed qsr task generator
I'll write more about this later
2023-04-15 15:08:18 +02:00
Brian Albert Monroe db2dd8b131
Don't rank the QSR task 2023-04-15 13:11:10 +02:00
Brian Albert Monroe 64bfd3ee45
Add qsr_task to make insts from qsr 2023-04-04 12:30:50 +02:00
Brian Albert Monroe cda7aba54a
rcest: Add changes due to new rcest functionality
continuous-integration/drone/push Build is passing Details
2021-03-30 09:55:48 +02:00
Brian Albert Monroe 61b0f3ee72
Update to use latest rcest rank inst
continuous-integration/drone/push Build is passing Details
2020-12-23 10:48:52 +02:00
Brian Albert Monroe 8b9215d9c0
add get/set inst environment variables
continuous-integration/drone/push Build is passing Details
This allows the internal instrument to be handled as a regular
environment object. It can be saved, exported, directly modified (not
recommended), whatever.
2020-07-31 14:41:11 +02:00
Brian Albert Monroe 76ad9b7659 check for inst in environment when getting
fail otherwise
Fixes #7
2020-06-05 06:58:35 +00:00
Brian Albert Monroe bd108f7c77
test: Test that risk premade insts are ranked
continuous-integration/drone/push Build is passing Details
2020-03-10 18:11:34 +02:00
Brian Albert Monroe 69029474c0
premade: Move more premade insts from extra 2020-03-10 18:09:38 +02:00
Brian Albert Monroe 2bdd920317
tests: fix tests
continuous-integration/drone/push Build is passing Details
2020-03-10 15:42:15 +02:00
Brian Albert Monroe bc9807a585
tests: Update tests
continuous-integration/drone/push Build is failing Details
2020-03-10 15:40:00 +02:00
Brian Albert Monroe af48c97987
tests: Fix tests and README
continuous-integration/drone/push Build is failing Details
2020-03-10 15:32:05 +02:00
Brian Albert Monroe 689613d5bc
tests: Add drone tests
continuous-integration/drone/push Build is failing Details
That error shouldn't have happened. That's why I implemented drone, so I
better start using it.
2020-03-10 15:28:12 +02:00
Brian Albert Monroe 3fab41fb14
inst: Move some code around for premade insts
Fix an issue with the WX instrument. Incorrectly put in
2020-03-10 15:19:00 +02:00
Brian Albert Monroe 7859066476
VERSION: bump version for drat 2020-02-20 13:59:30 +02:00
Brian Albert Monroe 80022b28e0
speedup: The option choosing function by a lot
Looking at the previous version, it was an example of bad practice.
Vectorized some things and got a nearly 100x speed increase with
identical results.
2020-02-15 11:15:54 +02:00
Brian Albert Monroe 0b9ddd54f3
gen: Allow lfun to be null, in which case don't make choices 2020-02-06 08:28:46 +02:00
Brian Albert Monroe f1454692b0
README: Update it 2020-02-06 07:20:33 +02:00
Brian Albert Monroe 9d47997f87
gen_choice: Add option to adjust base_pars in inst 2020-01-30 12:50:33 +02:00
Brian Albert Monroe a2222f1c9b
fix: Allow no covars to be passed to gen_choice
The code to integrate covars creates a matrix using the covar values.
Matrix creation fails when the length of covars is 0, so put an if
statement to check for covars first.

Fixes #6
2020-01-29 15:24:25 +02:00
Brian Albert Monroe e303a9cd21
NEW: Brand new way of simulating
User now supplies the function that generates the likelihoods. This
makes the package independent from rcguts, though it still relies on
rcest. rcgen also no longer handles the generation of preferences. That
was a boondoggle that I'm glad to be rid of. It does provide some helper
functions to easily add covars / parameters to the instrument.
Instruments need to be set in the rcest way of doing things.
2020-01-28 20:51:30 +02:00
Brian Albert Monroe cbe2deb1f5
premade: Have get_inst return combined insts 2020-01-28 12:25:13 +02:00
Brian Albert Monroe 8266021317
rcest: redo pre-made insts to conform to new style 2020-01-28 12:15:08 +02:00
Brian Albert Monroe e2bb3fdb41
rcguts: Change call to rcguts for the new naming convention 2019-08-03 12:01:16 +02:00
Brian Albert Monroe ecc8e135f2
Tiny change to drop a couple lines of code 2019-06-17 08:42:27 +02:00
Brian Albert Monroe 990c16d562
feat(choose_n_opts) Add function to choose among n options
Rewrote the code that did this non-functionally in the mkchoice function
as a Rcpp function. This made it exportable and also sped it up 100x.

Fixes #2
2019-06-16 09:29:54 +02:00
Brian Albert Monroe dfa754a950
fix(readme) put it in the right place 2019-04-11 11:48:44 +02:00
Brian Albert Monroe 81af3edf16
fix(readme) make a basic readme with a description of the package
Fixes #1
2019-04-11 11:43:49 +02:00
Brian Albert Monroe 20e87aeef6
feat(set_inst) Add all default inst using set_inst
Also change internals to use get_inst

Fixes #3
2019-04-11 11:39:19 +02:00
Brian Albert Monroe a106f592ef
feat(set_inst) Add in basic framework for set/get inst 2019-04-11 10:44:20 +02:00
Brian Albert Monroe 63fee4c203
fix(premade) Make 0s into 0.01s for AH premade 2019-02-22 14:52:27 +02:00
Brian Albert Monroe af722843a0
fix(format) Remove call to "inst-clean" and small formatting changes.
The inst-clean call should be removed from rcguts. It isn't smart with
respect to the layout of the instrument and it's a bit superfluous given
the later calls to reginst. When the mkinst call is done in isolation,
it should be up to the user to clean further.
2019-02-16 10:44:13 +02:00
Brian Albert Monroe 8fafde6a05
add_inst(premade) Add in the "BAM_t" instrument.
This is a dumb time instrument. This is just used in testing-prep for
more integrated discount function estimation and choice generation.
2019-02-16 10:43:50 +02:00
Brian Albert Monroe 0a23a95aaa
feat(mkinst) Add missing variables to instruments
Allows instruments to be initially of different columns but able to be
combined by finding the missing variables and adding them. Makes it so
adding one column to one instrument doesn't require changing every
instrument.
2019-02-16 10:40:59 +02:00
Brian Albert Monroe 54bf55d9c9 Add in the Wilcox instrument. 2018-08-03 12:36:09 +02:00
Brian Albert Monroe dc5d208e84 Export make_prefs function to do preference generation. 2018-07-20 13:52:55 +02:00
Brian Albert Monroe e9d6650205 cgen/mkinst to allow multiple instruments
This needs to be tested with instruments of different number of outcomes
and probabilities.
2018-07-17 22:39:59 +02:00
Brian Albert Monroe 8e708b2dbd Add a check for parnames 2018-07-11 17:25:53 +02:00
Brian Albert Monroe d68c4a64f7 Add N option choice simulation, add dfun stuff 2018-04-05 08:58:21 +02:00
Brian Albert Monroe 2450da7979 farm some more internals out to rcguts 2018-03-23 21:38:05 +02:00
Brian Albert Monroe 5800f3a3a5 Update to make use of new rcguts regist function 2018-03-22 15:14:37 +02:00
Brian Albert Monroe c735e471d8 Update in progress of n-opt instruments. No frontend functions changed. 2018-03-21 11:06:41 +02:00
Brian Albert Monroe ecaa4542ae Fix namespace issue with dplyr, add default to cgen 2018-03-18 11:46:37 +02:00
Brian Albert Monroe aa7aa1f3ee Make general cgen function, make consistent with ftype_parser 2018-03-18 10:31:13 +02:00
Brian Albert Monroe bac0a91ac1 Add clean function from rcguts, farm a few more functions to rcguts 2018-03-17 22:54:22 +02:00
Brian Albert Monroe fcb63c58ec Update namespace 2018-03-16 23:55:41 +02:00
Brian Albert Monroe 6b81c096e6 MASSIVE CHANGES!
Development of rcguts has progressed to the point to make it the backend
of at least this package. Doing so cuts out a lot of stuff that handled
various utility/probability weighting/stochastic function stuff. So long
as the functions are available in rcguts, they're now available here.
Other changes include how the initial paramaters are passed in, the
ability to pass a data.frame in as an instrument, a dedicated "choose"
function so the same preferences can make new choices. More to come.
2018-03-16 23:48:44 +02:00
Brian Albert Monroe 061ff821bb Add instrument, small rearranging 2018-01-27 09:25:00 +02:00
Brian Albert Monroe e5a800c822 First Commit - changed from 'cgen', fresh git history 2017-07-11 17:02:30 +02:00