I want to do a cubic regression on five data points: (1024, 1), (4096, 8), (16384, 16), (65536, 16), (262144, 48). I am not a regular R user, so I've done some research. First what I do is this (source):
df <- read.table(text="GRID Value 1024 1 4096 8 16384 16 65536
16 262144 48", header=TRUE)
Then
plot(q, df,type='b',col='navy',main='Nonlinear relationship',lwd=3)
But the plot that I get is just a "connecting the dots" plot, not an actual cubic regression (please see below). I would appreciate some help on how to resolve this issue.