I have this code: Vm <- c(6.2208, 4.9736, 4.1423, 3.1031, 2.4795, 1.6483, 1.2328, 0.98357, 0.81746, 0.60998); #Molvolume p <- c(0.4, 0.5, 0.6, 0.8, 1, 1.5, 2, 2.5, 3, 4)*1000; #Pressure Rydb <- 8.3144621; #Constant Tempi <- 300; #Temperature in Kelvin
Vmi <- Vm^(-1); #To get Vm^(-1) Zi <- (p*Vm)/(Rydb*Tempi) #To get Z #Plot dframe <- data.frame(Vmi, Zi) plot(dframe, pch=19, col='red', main='Thermodynamic properties of Argon', xlab='1/Vm', ylab='Z') #Fit for B fitb <-lm(Zi ~ Vmi); fitb$coefficients[1]; fitb$coefficients[2]; summary(fitb) I want to make a regression on the data with this generel formula: y=1+Bx+Cx^2. I need to figure out what B and C in this formula is. Please help me! I want to become better to R. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.