search for: mdl1

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

Did you mean: md1
2009 Nov 13
1
Problem plotting output from tree()
...e it have any effect. Here is some example code to illustrate what I mean: #################################################### #some fake data set.seed(123) f1 <- factor(rep(1:4, 50)) m1 <- matrix(runif(800), nc=4) d1 <- data.frame(f1, m1) #the test library(tree) mdl1 <- tree(f1 ~ ., data=d1) #(messy) output plot(mdl1); text(mdl1, cex=.6) plot(mdl1); text(mdl1, cex=.6, digits=2) #no change to labelling #help! ?text.tree #################################################### Can anyone spot my error? Many thanks for any help. Ian Robertson
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
...re completely different! 1) NIR 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(...
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!!
...the explanation of the process, hope there will be someone who can help me! suppose i have a basic Cobb-Douglas production function, ( i am not gonna give many information about the R commands or about the data since my questionn is rather theoric) and i run this model with OLS as following; >mdl1 = lm(lnQ~lnC+lnL+lnM+lnE,data=newdata) than in the second step, i need to get the predicted residual as a mesure of "total factor productivity" ==> epsilon(hat)it= lnQit-lnQ(hat)it and i get the residual by typing; residuals(mdl1) ==> do i make mistake here or should i write anothe...