search for: gasolin

Displaying 20 results from an estimated 45 matches for "gasolin".

Did you mean: gasoline
2011 Jul 21
1
Error: bad index in plotmo functions for MARS model (package earth)
...l (with earth package) but I get the follow error message: > plotmo( mars ) Error: bad index (missing column in x?) I don't no how to workround this... :-( I thanks in advanced by some help! Thanks. Cleber ############### > > ### example code: > library( earth ) > data( gasoline, package='pls' ) > > nir <- gasoline$NIR > dim( nir ) [1] 60 401 > class( nir ) [1] "AsIs" > > oct <- gasoline$octane > > mars <- earth( oct ~ nir, nk=300, nfold=10, degree=3, trace=0 ) > > plotmo( mars ) Error: bad index (missi...
2010 May 11
1
Gasoline Data in pls package
Hi - I am using pls package for some pcr computations. There is a data set called gasoline. Would someone be able to tell me what command(s) could be used to produce this graph in R? I am not sure where the log(1/R) - Y-axis - are coming from Thanks much Ravi
2009 Dec 08
1
Serial Correlation in panel data regression
Dear R users, I have a question here library(AER) library(plm) library(sandwich) ## take the following data data("Gasoline", package="plm") Gasoline$f.year=as.factor(Gasoline$year) Now I run the following regression rhs <- "-1 + f.year + lincomep+lrpmg+lcarpcap" m1<- lm(as.formula(paste("lgaspcar ~", rhs)), data=Gasoline) ###Now I want to find the autocorrelation,heteroskedas...
2009 Oct 22
1
data frame is killing me! help
Usage data(gasoline) Format A data frame with 60 observations on the following 2 variables. octane a numeric vector. The octane number. NIR a matrix with 401 columns. The NIR spectrum and I see the gasoline data to see below NIR.1686 nm NIR.1688 nm NIR.1690 nm NIR.1692 nm NIR.1694 nm NIR.1696 nm NIR.1698 nm NI...
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...ail.com> wrote: > > poly(NIR, degree = 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(gasTrai...
2017 Jul 13
4
Quadratic function with interaction terms for the PLS fitting model?
...data. 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...
2008 May 11
1
Fundamental formula and dataframe question.
...ntly fundamental feature of R (or of the package pls) which I don't understand. For datasets with many independent (X) variables such as chemometric datasets there is a convenient formula and dataframe construction that allows one to access the entire X matrix with a single term. Consider the gasoline dataset available in the pls package. For the model statement in the plsr function one can write: Octane ~ NIR NIR refers to a (wide) matrix which is a portion of a dataframe. The naming of the columns is of the form: 'NIR.xxxx nm' names(gasoline) returns... $names [1] "octane&quot...
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
...rform partial least square on a set of multivariate data. 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 measur...
2011 Jan 10
3
Lattice, combine histogram and line graph
Hello everyone, I have a simple histogram of gasoline prices going back a few years that I want to insert a line graph of consumer price index (cpi) over the histogram. I have looked through the "Lattice" book by Deepayan Sarkar but don't see anything there. How might this be done? An example would be wonderful. Current code snipp...
2017 Jul 13
3
How to formulate quadratic function with interaction terms for the PLS fitting model?
...a set of > multivariate data. 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 dif...
2009 Jul 09
2
plm Issues
...at the first summary(plm(...)) call returns the same result as the second (it shouldn't if it actually uses the lagged variable requested). The third call results in error (trying to use diff'ed variable in regression) Other info: I'm running R 2.7.2 on WinXP cheers *>data("Gasoline",package="Ecdat") >Gasoline_plm<-plm.data(Gasoline,c("country","year")) >pdim(Gasoline_plm) **Balanced Panel: n=18, T=19, N=342 * *>summary(plm(lgaspcar~lincomep,data=Gasoline_plm**)) **Oneway (individual) effect Within Model Call: plm(formula = lgas...
2017 Jul 13
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...variate data. 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...
2011 Feb 20
0
Extreme Values - Help with GPD function
Hi, I'm a second year Master's student in Applied Statistics. I am doing a project using average weekly U.S. regular gasoline prices (in cents, per gallon) from an Excel file (from the years 1990- May 2010). I want to find the probability that the average weekly U.S. regular gasoline prices (in the long term) goes over 400 cents a gallon (or $4.00 a gallon). I am using the extRemes program (in R), and I've al...
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...t of > multivariate data. 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 consist...
2011 Jun 27
2
R PLS package data format
...tor(t$X2) returns TRUE R splits the columns of a matrix into column vectors automatically. How should I create a data frame of t$y & t$x such that >is.vector(t$y) returns TRUE >is.matrix(t$x) returns TRUE That is, how to make x column of the data frame a matrix? Just like the test data ¡§gasoline¡¨ in your PLS package: >library(pls) >data(yarn) >is.vector(density) returns TRUE >is.matrix(NIR) returns TURE (NIR is a matrix) Best regards, Shaowen Cheng ________________________________ The information in this e-mail may be confidential; it is intended for use solely by the indiv...
2017 Jul 16
2
How to formulate quadratic function with interaction terms for the PLS fitting model?
...ead 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 variabl...
2010 May 11
1
merge two data frames
...quot;COCOA", "COFFEE C", "COPPER", "CORN", "COTTON NO.2", "CRUDE OIL miNY", "FEEDER CATTLE", "GOLD", "HEATING OIL", "HENRY HUB NATURAL GAS", "LEAN HOG", "LIVE CATTLE", "NY HARBR GASOLINE BLDSTK", "ORANGE J.", "PALLADIUM", "PLATINUM", "PRIMARY NICKEL USD", "PRM HGH GD ALUMINIUM USD", "RANDOM LENGTH LUMBER", "ROBUSTA COFFEE (10)", "SILVER ", "SOYBEAN MEAL ", "SOYBEAN OIL", &qu...
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
...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. >>> >>> NI...
2006 Dec 13
1
Question about hardware
..."sophisticated telephony VoIP stuff" asterisk, what hardware would I need? I have a feeling that my fax modem is probably not going to work out. My wife and I have an income of $650 a month. After the first-of-the-month bills are payed, we're lucky if we have $100 left for food and gasoline. I need a solution that's as economical as possible. What exactly do I need in terms of hardware (preferrably specific as in brand names and model numbers)?
2017 Jul 12
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...rform partial least square on a set of multivariate data. 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 measur...