Skip to content

Commit

Permalink
version 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jsl5-code authored and gaborcsardi committed Mar 13, 2014
1 parent b69cac2 commit 391251f
Show file tree
Hide file tree
Showing 34 changed files with 975 additions and 673 deletions.
27 changes: 17 additions & 10 deletions DESCRIPTION
@@ -1,18 +1,25 @@
Package: mixexp
Type: Package
Title: Design and analysis of mixture experiments
Version: 1.1.9
Date: 2014-12-12
Author: John Lawson <lawson@byu.edu> and Cameron Willden <ccwillden@gmail.com>, with contributions from Greg Piepel
Maintainer: John Lawson <lawson@byu.edu>
Title: Design and Analysis of Mixture Experiments
Version: 1.2.1
Date: 2014-3-13
Authors@R: c(person("John","Lawson", role=c("aut","cre"), email="lawson@byu.edu"),
person("Cameron","Willden", role="aut", email="ccwillden@gmail.com"),
person("Greg","Piepel", role="ctb", email="greg.piepel@pnnl.gov")
)
Description: Functions for creating designs for mixture experiments, making ternary contour plots, and making mixture effect plots.
License: GPL-2
Depends: gdata, lattice, grid, daewr
LazyLoad: yes
LazyData: yes
Maintainer: John Lawson <lawson@byu.edu>
Depends: gdata, lattice, grid, daewr
Author: John Lawson [aut, cre],
Cameron Willden [aut],
Greg Piepel [ctb]
Repository: CRAN
Repository/R-Forge/Project: daewr
Repository/R-Forge/Revision: 101
Repository/R-Forge/DateTimeStamp: 2014-12-12 21:39:17
Date/Publication: 2014-12-13 08:02:44
Packaged: 2014-12-12 21:45:10 UTC; rforge
Repository/R-Forge/Revision: 113
Repository/R-Forge/DateTimeStamp: 2015-03-16 18:54:01
Date/Publication: 2015-03-17 00:04:20
Packaged: 2015-03-16 19:05:15 UTC; rforge
NeedsCompilation: yes
62 changes: 33 additions & 29 deletions MD5
@@ -1,40 +1,44 @@
b24b3060b154031a5814a300afb516ef *DESCRIPTION
788c6be87e8f0af71133efc221533d65 *NAMESPACE
ea382d7453c479a03af89691cc374ccc *R/DesignPoints.R
2aba9e9441ab3ba868b42efa8860814f *R/EffPlot.R
81e8e18fe14f58ce3ce242cc267b1783 *DESCRIPTION
b9982cdd171365b13d75339fdd70a7c2 *NAMESPACE
77a8b1c64f1a7703a9b7f600de4c1445 *R/DesignPoints.R
33acdfbfe08905b611bce89f057c2993 *R/EffPlot.R
3ad3c71d8af463b0f60927c48b6e748a *R/Eflags.R
e5923423320694b42f114b885f71a72e *R/Fillv.R
b13380299d991f907ebd51b08be60d62 *R/MixModel.R
db890971519809f9cc3f79f16082f2ff *R/MixturePlot.R
51777b9d9c985bfa4c70454b14d19962 *R/ModelEff.R
5249a4ad3378db1f384f2bd9e803b688 *R/ModelPlot.R
50389be5f10efe4b9fd0c4e1ea3bb504 *R/MixModel.R
c936f95617ccf9aea62918e6fb30e317 *R/MixturePlot.R
60ae32e152d1593fe10d7e237eaa1de3 *R/ModelEff.R
f69c6c3f18cf8c61ffc073509f093d09 *R/ModelPLot.R
7c14430661e5a923dc39735d2cfa28a6 *R/Nrows.R
1d1e41d2404b692fcb2a12609635db5a *R/SCD.R
85308cc0960ee332036cfdc426f161f2 *R/SLD.R
134fca4ac05726ef4c3caae88fcb1612 *R/SLD.R
e70968351adb60ab99a8571bb4c0a18a *R/Vertcen.R
a447d784bb61990a3e86539ba74f1ffa *R/Xvert.R
030481ace7350906616dd1664f94e931 *R/crvtave.R
c6f4128107aceabcc4f15c4dc875ac46 *R/cubic.R
c1eadd695808d7a6fdc42ac85b2f0873 *data/Burn.rda
273a863fdafc5f7544663b7b3f35f511 *data/SneeMq.rda
66138b386fc212a206bc257e93a2b930 *data/conmx.rda
3fd3d652333579c24c0f16b644b03e5b *man/Burn.Rd
c5ec4b8a6e72cbcd7dc8f87a9d3bdb3e *man/DesignPoints.Rd
1f38ab47802504244a6dabc3d1e25d0d *man/EffPlot.Rd
9d7f235aed70124c06cf37f2f3f506c1 *man/Eflags.Rd
625a26ad79003b0984b5d389b7de606a *man/Fillv.Rd
e773ef575da8279dc7ef3b144d23345d *man/MixModel.Rd
b008d79d19cf43df4cbfc4aacfe1ade2 *man/MixturePlot.Rd
359ae1152c3f6b77d0c14b003fae4e89 *man/ModelEff.Rd
2b51e52180243cf3c9c85a95a7e7b0b7 *man/ModelPlot.Rd
031f27303339b56b0f5f39e94648e048 *R/cubic.R
ce6cb46589c1e9f9252b6e36c7259ca7 *data/Burn.rda
74dedaa7024b06d4c6bda4a3ef51117c *data/SneeMq.rda
7b2bc6570820d38d93037815aa88bb40 *data/conmx.rda
47c4b86a2190626dc788850b44693f19 *data/etch.rda
88081ee4bc0c54d6d2f4027f4c66fbc1 *data/fishp.rda
d20fc60b0019f76bf559facc6875961a *man/Burn.Rd
998899131a006ecd80ae16b10467ac86 *man/DesignPoints.Rd
d20250080705c346d1106382466e4a78 *man/EffPlot.Rd
f914b3a506be8bec91d1f0a79cda6d48 *man/Eflags.Rd
a79b89bdab8d992d2e5c68a5a7eef766 *man/Fillv.Rd
0c11efda0e30d6915a8755157e23cb67 *man/MixModel.Rd
5bf823c1de8f74bd7995fc33ebb0c71f *man/MixturePlot.Rd
ac3f096663d75a4c70247c2ba7910a0f *man/ModelEff.Rd
dfae29ee1103106b8c9a03432908ddd4 *man/ModelPlot.Rd
879dc499dd3a525092f962a75635e691 *man/Nrows.Rd
93752cb0de5f573cc8aab1c4d3eca31c *man/SCD.Rd
7d54d42a54f3d4c616a078c2a831d874 *man/SLD.Rd
ef120358472acaeef56830a2e77c4003 *man/SneeMq.Rd
839670e08fa17a6fdd089d333c7faca9 *man/Vertcen.Rd
3cbfa760438ddbdea88d8e5acf0f6828 *man/Xvert.Rd
6327eea5cb25faf196de55f8f675e342 *man/SLD.Rd
ec7225ff8d93910f1363abae61f6d873 *man/SneeMq.Rd
6a11500723735ff56c755f8340f5ba7f *man/Vertcen.Rd
99f68daf893ef3e06058a76185b7585b *man/Xvert.Rd
8d4b33af6aefb0bf66ab73a7bf021978 *man/conmx.Rd
0ff0431b909cec74010404c99723231f *man/crvtave.Rd
b76d4ba05bdfefebbac57def0fa56ced *man/cubic.Rd
6845de9a421bf92cc67ae4275b0efa41 *man/mixexp-package.Rd
15b69d109fcb42117501e7bda7fa8ae0 *man/crvtave.Rd
2fae74dce1146a040a67dea44bcd6659 *man/cubic.Rd
805384136854dda2757dba49415cd9bc *man/etch.Rd
c140dd2a7cfc3556cc082b07241d3175 *man/fishp.Rd
043f4f40463d68c95ef6638c708150e1 *man/mixexp-package.Rd
4adf6166def03e0720733fa47d8e82c0 *src/cnvrt.f
20 changes: 10 additions & 10 deletions NAMESPACE
@@ -1,18 +1,18 @@
useDynLib(mixexp)
import(gdata, lattice, grid, daewr)
export(crvtave,
EffPlot,
cubic,
Eflags,
Nrows,
Vertcen,
SCD,
SLD,
MixturePlot,
Nrows,
Vertcen,
SCD,
SLD,
MixturePlot,
MixModel,
ModelPlot,
DesignPoints,
Xvert,
EffPlot,
ModelPlot,
DesignPoints,
Xvert,
ModelEff,
Fillv
Fillv
)
30 changes: 12 additions & 18 deletions R/DesignPoints.R
@@ -1,5 +1,5 @@
DesignPoints = function (des = NULL,nmxcmp=3, x = NULL, y = NULL, z = NULL, x1lower = 0,
x1upper = 0, x2lower = 0, x2upper = 0, x3lower = 0, x3upper = 0,
DesignPoints = function (des = NULL,nmxcmp=3, x = NULL, y = NULL, z = NULL,x1lower=0,x1upper=0,
x2lower=0, x2upper=0,x3lower=0,x3upper=0,
cornerlabs = c("x3","x2","x1"),
axislabs=c("x1","x2","x3"),pseudo=FALSE)
{
Expand Down Expand Up @@ -33,22 +33,16 @@ DesignPoints = function (des = NULL,nmxcmp=3, x = NULL, y = NULL, z = NULL, x1lo
z<-des[ ,1]
}
w <- runif(length(x))
Check <- x1lower + x1upper + x2lower + x2upper + x3lower +
x3upper
if (Check == 0) {
cls <- c(rep(0, 6))
constraints = FALSE
}
else {
cls <- c(rep(0, 6))
cls[1] <- x1lower
cls[2] <- x1upper
cls[3] <- x2lower
cls[4] <- x2upper
cls[5] <- x3lower
cls[6] <- x3upper
constraints = TRUE
}

cls<-c(rep(0,6))
cls[1]<-min(z)
cls[2]<-max(z)
cls[3]<-min(y)
cls[4]<-max(y)
cls[5]<-min(x)
cls[6]<-max(x)
if (max(cls[1],cls[3],cls[5])>0 | min(cls[2],cls[4],cls[6])<1) {constraints= TRUE} else {constraints=FALSE}

MixturePlot(x, y, z, w, x3lab = axislabs[3], x2lab = axislabs[2],
x1lab = axislabs[1], corner.labs = cornerlabs,
lims = cls, constrts = constraints, contrs = FALSE, cols = FALSE,
Expand Down
16 changes: 8 additions & 8 deletions R/Effplot.R
@@ -1,11 +1,11 @@
EffPlot = function(des=NULL,nfac=3,mod=1,dir=1,dimensions = list(NULL))
EffPlot = function(des=NULL,nfac=3,mod=1,dir=1)
{
# glimit is the resolution for the plot
glimit<-25

# check for valid mod
if(mod < 1 | mod > 3)
stop("mod must be a number between 1 and 3")
if(mod < 1 | mod == 3| mod > 4)
stop("mod must be one of the following: 1 = linear, 2 = quadratic, or 4 = Special Cubic")

# get the number of factors from the design
if(! is.null(des)) {
Expand All @@ -20,7 +20,7 @@ EffPlot = function(des=NULL,nfac=3,mod=1,dir=1,dimensions = list(NULL))
stop("The number factors must be between 2 and 12")
if (nfac>=7 & mod>=2)
stop("Linear models only when the number of factors is greater than 6")
if (nfac<3 & mod==3)
if (nfac<3 & mod==4)
stop("Special cubic model requires at least 3 factors")

# initialize lower and upper bounds
Expand Down Expand Up @@ -122,7 +122,7 @@ EffPlot = function(des=NULL,nfac=3,mod=1,dir=1,dimensions = list(NULL))
}
}

if (mod==3) {
if (mod==4) {
if (nfac==3) {
modl<-lm(y~x1+x2+x3+x1*x2+x1*x3+x2*x3+x1*x2*x3-1,data=des)
Beta<-modl$coeff
Expand Down Expand Up @@ -459,7 +459,7 @@ EffPlot = function(des=NULL,nfac=3,mod=1,dir=1,dimensions = list(NULL))
}


if (mod==3) {
if (mod==4) {
if (nfac==3) {
Xmat<-cbind(Xtemp,Xtemp[,1]*Xtemp[,2],Xtemp[,1]*Xtemp[,3],Xtemp[,2]*Xtemp[,3],Xtemp[,1]*Xtemp[,2]*Xtemp[,3])
}
Expand All @@ -474,7 +474,7 @@ EffPlot = function(des=NULL,nfac=3,mod=1,dir=1,dimensions = list(NULL))
}
}

if(mod<=3) {
if(mod <=2 | mod == 4) {
yhX<-Xmat%*%Beta
}

Expand Down Expand Up @@ -531,7 +531,7 @@ EffPlot = function(des=NULL,nfac=3,mod=1,dir=1,dimensions = list(NULL))
}


# return(PX)
return(PX)
}
##############################################################

0 comments on commit 391251f

Please sign in to comment.