# [R] Help with regression

Thu Sep 4 22:18:49 CEST 2014

```You will find lots of examples if you do an internet search for
Here's just one ... http://www.theanalysisfactor.com/r-tutorial-4/

Jean

On Thu, Sep 4, 2014 at 10:40 AM, Basilius Sapientia <basiliussap at gmail.com>
wrote:

> 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;
> fitb\$coefficients;
> 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 at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help