search for: mdl2

Displaying 3 results from an estimated 3 matches for "mdl2".

Did you mean: md2
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...must be a matrix, or poly(NIR,...) will fail. 2) Due to the previously identified bug in poly, degree must be explicitly given as poly(NIR, degree =2,raw = TRUE). Now consider the following example: > df <-matrix(runif(60),ncol=3) > y <- runif(20) > mdl1 <-lm(y~df*I(df^2)) > mdl2 <-lm(y~df*poly(df,degree=2,raw=TRUE)) > length(coef(mdl1)) [1] 16 > length(coef(mdl2)) [1] 40 Explanation: In mdl1, I(df^2) gives the squared values of the 3 columns of df. The formula df*I(df^2) gives the 3 (linear) terms of df, the 3 pure quadratics of I(df^2), the 9 cubic terms obtaine...
2017 Jul 16
2
How to formulate quadratic function with interaction terms for the PLS fitting model?
> On Jul 13, 2017, at 7:43 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > Below. > > -- Bert > Bert Gunter > > > > On Thu, Jul 13, 2017 at 3:07 AM, Luigi Biagini <luigi.biagini at gmail.com> wrote: >> I have two ideas about it. >> >> 1- >> i) Entering variables in quadratic form is done with the command I >>
2010 Apr 14
0
total. factor. prodctvty. help!!
...es on it, such as "eco" and "RD" and i want to use panel-data techniques in order to get the effect of eco and RD net of unobserved heterogeneity. so the theortically the model that i want to estimate is TFPit=alpha0+alpha1(eco)+alpha2(RD)+Ui+Vt+Wit so i run this command; >mdl2<-plm(resid~eco+RD, data=newdata) then there is an error Error in model.frame.default(formula = resid ~ eco + RD, data = ds, drop.unused.levels = TRUE) : variable lengths differ (found for 'eco') well here in fact, probably i am doing a econometrical mistake that might be quite easy f...