Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

DTRlearn (version 1.0)

plot.qlearn: Plot the linear coefficients of interaction

Description

Plot the standardized coefficients from linear regression, i.e. it devides the coefficients for a selected set of variables by the L2 norm.

Usage

## S3 method for class 'qlearn'
## S3 method for class 'qlearn':
plot(x, index = NULL, names = NULL, 
ylab = "std coefficients", xlab = "", col = "gray", ...)

Arguments

x
Single stage Qlearning model of class qlearn
index
is the vector of indexes of variables to plot.
names
is the vector of names of each variables to appear in the plot. If not specified, the names would be V1-Vp
ylab
The label for y yaxis.defalt is "std coefficients"
xlab
The label for x yaxis.
col
color to fill the bars in the plot.
...
further arguments passed to or from other methods.

See Also

Qlearning_Single

Examples

Run this code
n=200
A=2*rbinom(n,1,0.5)-1
p=20
mu=numeric(p)
Sigma=diag(p)
X=mvrnorm(n,mu,Sigma)
R=X[,1:3]%*%c(1,1,-2)+X[,3:5]%*%c(1,1,-2)*A+rnorm(n)
modelQ=Qlearning_Single(X,A,R)
plot(modelQ)

Run the code above in your browser using DataLab