search for: gas1

Displaying 13 results from an estimated 13 matches for "gas1".

Did you mean: gas
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...egree = 2) will work if NIR is a matrix, not a data.frame. > The degree argument apparently *must* be explicitly named if NIR is > not a numeric vector. AFAICS, this is unclear or unstated in ?poly. I still get the same error with: library(pld) data(gasoline) gasTrain <- gasoline[1:50,] gas1 <- plsr(octane ~ poly(as.matrix(NIR), 2), ncomp = 10, data = gasTrain, validation = "LOO") Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : invalid 'times' value > gas1 <- plsr(octane ~ poly(as.matrix(gasTrain$NIR), degree=2), ncomp = 10, data =...
2017 Jul 13
4
Quadratic function with interaction terms for the PLS fitting model?
...dratic function with interaction terms. But I am not sure >> how. I will use an example to illustrate my problem: >> >> Following the example in the PLS manual: >> ## Read data >> data(gasoline) >> gasTrain <- gasoline[1:50,] >> ## Perform PLS >> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >> >> where octane ~ NIR is the model that this example is fitting with. >> >> NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse >> reflectance measurements fro...
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
.... Instead of fitting a linear model, I want to fit my data with a quadratic function with interaction terms. But I am not sure how. I will use an example to illustrate my problem: Following the example in the PLS manual: ## Read data data(gasoline) gasTrain <- gasoline[1:50,] ## Perform PLS gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") where octane ~ NIR is the model that this example is fitting with. NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse reflectance measurements from 900 to 1700 nm. Instead of fitting with...
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...to fit my > data with a quadratic function with interaction terms. But I am not sure > how. I will use an example to illustrate my problem: > > Following the example in the PLS manual: > ## Read data > data(gasoline) > gasTrain <- gasoline[1:50,] > ## Perform PLS > gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") > > where octane ~ NIR is the model that this example is fitting with. > > NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse > reflectance measurements from 900 to 1700 nm....
2009 Apr 19
1
dynlm question: How to predefine formula for call to dynlm(formula) call
I want to set up a model with a formula and then run dynlm(formula) because I ultimately want to loop over a set of formulas (see end of post) R> form <- gas~price R> dynlm(form) Time series regression with "ts" data: Start = 1959(1), End = 1990(4) <snip> Works OK without a Lag term R> dynlm(gas ~ L(gas,1)) Time series regression with "ts" data: Start =
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...terms. But I am not sure >>> how. I will use an example to illustrate my problem: >>> >>> Following the example in the PLS manual: >>> ## Read data >>> data(gasoline) >>> gasTrain <- gasoline[1:50,] >>> ## Perform PLS >>> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >>> >>> where octane ~ NIR is the model that this example is fitting with. >>> >>> NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse >>> reflec...
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
...gt;>> how. I will use an example to illustrate my problem: >>>> >>>> Following the example in the PLS manual: >>>> ## Read data >>>> data(gasoline) >>>> gasTrain <- gasoline[1:50,] >>>> ## Perform PLS >>>> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >>>> >>>> where octane ~ NIR is the model that this example is fitting with. >>>> >>>> NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse >&...
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...an example to illustrate my problem: >>>>> >>>>> Following the example in the PLS manual: >>>>> ## Read data >>>>> data(gasoline) >>>>> gasTrain <- gasoline[1:50,] >>>>> ## Perform PLS >>>>> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >>>>> >>>>> where octane ~ NIR is the model that this example is fitting with. >>>>> >>>>> NIR is a collective of variables, i.e. NIR spectra consists of...
2017 Jul 13
3
How to formulate quadratic function with interaction terms for the PLS fitting model?
...want to fit my > data with a quadratic function with interaction terms. But I am not sure > how. I will use an example to illustrate my problem: > Following the example in the PLS manual: > ## Read data > data(gasoline) > gasTrain <- gasoline[1:50,] > ## Perform PLS > gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") > where octane ~ NIR is the model that this example is fitting with. > NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse > reflectance measurements from 900 to 1700 nm. > Instead...
2017 Jul 13
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...th a quadratic function with interaction terms. But I am not sure >> how. I will use an example to illustrate my problem: >> Following the example in the PLS manual: >> ## Read data >> data(gasoline) >> gasTrain <- gasoline[1:50,] >> ## Perform PLS >> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >> where octane ~ NIR is the model that this example is fitting with. >> NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse >> reflectance measurements from 900 to 1700 nm....
2017 Jul 16
2
How to formulate quadratic function with interaction terms for the PLS fitting model?
...h interaction terms. But I am not sure >>> how. I will use an example to illustrate my problem: >>> Following the example in the PLS manual: >>> ## Read data >>> data(gasoline) >>> gasTrain <- gasoline[1:50,] >>> ## Perform PLS >>> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >>> where octane ~ NIR is the model that this example is fitting with. >>> NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse >>> reflectance measurements from 900...
2017 Jul 12
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
.... Instead of fitting a linear model, I want to fit my data with a quadratic function with interaction terms. But I am not sure how. I will use an example to illustrate my problem: Following the example in the PLS manual: ## Read data data(gasoline) gasTrain <- gasoline[1:50,] ## Perform PLS gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") where octane ~ NIR is the model that this example is fitting with. NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse reflectance measurements from 900 to 1700 nm. Instead of fitting with...
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...am not sure >>>> how. I will use an example to illustrate my problem: >>>> Following the example in the PLS manual: >>>> ## Read data >>>> data(gasoline) >>>> gasTrain <- gasoline[1:50,] >>>> ## Perform PLS >>>> gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO") >>>> where octane ~ NIR is the model that this example is fitting with. >>>> NIR is a collective of variables, i.e. NIR spectra consists of 401 diffuse >>>> reflectance measuremen...