# search for: nir_sq

Displaying 4 results from an estimated 4 matches for "nir_sq".

Did you mean: err_sq
2017 Jul 13
3
How to formulate quadratic function with interaction terms for the PLS fitting model?
I have two ideas about it. 1- i) Entering variables in quadratic form is done with the command I (variable ^ 2) - plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation = "LOO" You could also use a new variable NIR_sq <- (NIR) ^ 2 ii) To insert a square variable, use syntax I (x ^ 2) - it is very important to insert I before the parentheses. iii) If you want to make the interaction between x and x ^ 2 use the command ":" -> x: I(x ^ 2) iv) For multiple interactions between x and x ^ 2 use the...
2017 Jul 13
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...mail.com> wrote: > I have two ideas about it. > > 1- > i) Entering variables in quadratic form is done with the command I > (variable ^ 2) - > plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation = > "LOO" > You could also use a new variable NIR_sq <- (NIR) ^ 2 > > ii) To insert a square variable, use syntax I (x ^ 2) - it is very > important to insert I before the parentheses. True, but better I believe: see ?poly. e.g. poly(cbind(x1,x2,x3), degree = 2, raw = TRUE) is a full quadratic polynomial in x1,x2,x3 . > > iii) If...
2017 Jul 16
2
How to formulate quadratic function with interaction terms for the PLS fitting model?
...ve two ideas about it. >> >> 1- >> i) Entering variables in quadratic form is done with the command I >> (variable ^ 2) - >> plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation = >> "LOO" >> You could also use a new variable NIR_sq <- (NIR) ^ 2 >> >> ii) To insert a square variable, use syntax I (x ^ 2) - it is very >> important to insert I before the parentheses. > > True, but better I believe: see ?poly. > e.g. poly(cbind(x1,x2,x3), degree = 2, raw = TRUE) is a full quadratic > polynomial...
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...>> >>> 1- >>> i) Entering variables in quadratic form is done with the command I >>> (variable ^ 2) - >>> plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation = >>> "LOO" >>> You could also use a new variable NIR_sq <- (NIR) ^ 2 >>> >>> ii) To insert a square variable, use syntax I (x ^ 2) - it is very >>> important to insert I before the parentheses. >> >> True, but better I believe: see ?poly. >> e.g. poly(cbind(x1,x2,x3), degree = 2, raw = TRUE) is a full quad...