Learn R Programming

linear.tools (version 1.3.0)

Manipulate Formulas and Evaluate Marginal Effects

Description

Provides tools to manipulate formulas, such as getting x, y or contrasts from the model/formula, and functions to evaluate and check the marginal effects of a linear model.

Copy Link

Version

Install

install.packages('linear.tools')

Monthly Downloads

23

Version

1.3.0

License

GPL-3

Maintainer

Fan Yang

Last Published

July 6th, 2016

Functions in linear.tools (1.3.0)

check_names_delete

check whether list names (tobechecked) is within specified sets ('checking')
check_single_numeric

check whether an object is a single numeric number
check_vec_meaningful

check x is a meaningful vector
deleting_wrongeffect

check monotonicity of marginal impacts and re-estimate the model.
effect

evaluate the marginal effects of the selected raw variable on the dependent.
expand_grid

a wrap up of expand.grid() that takes list
focusing_var_coeff

focusing on selected variables in the model, and eliminating impacts from other variables.
get_contrast

get contrast of categorical variables in a model
get_data_from_lm

get raw data from lm or glm
get_model_pair

get a list of model vars with their corresponding coeff vars or raw vars.
get_model_with_coeff

get a list of model variables with their corresponding coeff vars.
get_model_with_raw

get a list of model vars with their corresponding raw vars.
get_valid_rows

identify missing rows for model/formula.
get_x

get x (left hand of var) from model or formula
get_x_all

a unique combinations of model vars, coeff vars and raw vars
get_x_hidden

get_y

get y (right hand of var)
is_decrease

check whether the vector is decreasing
is_increase

check whether the vector is increasing
Mode

get mode number from a numeric vector
paste_formula

paste a formula as string
sanity_check

check x with various characters
stepwise2

same as step() in R, but able to check marginal effects.
stripGlmLR

make the lm or glm thin
Enter_to_Continue

Enter_to_Continue: wait your response to continue