Re: [R] One-parameter fitting

2013-07-03 Thread Birdada Simret
Thank you all ;) On Wed, Jul 3, 2013 at 4:28 PM, S Ellison wrote: > > Now I have question: what about y=b fitting? is there any model to > > force or impose the ax to be zero > > Rui Barradas has answered correctly for a simple lm case. > > You can also do > lm(y~1) to obtain an estimated

[R] One-parameter fitting

2013-07-03 Thread Birdada Simret
Greetings to every body. we know that for linear regression: two-parameter fitting in R: (for a and b as slope and intercept) [a] for y=ax+b type models we use: lm(y~x) [b] for y=axtype models we use: lm(y~0+x) => forced to pass through origin Now I have question: what about y=b fitting

Re: [R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread Birdada Simret
, > > type=c("p","b"),lcol=1,rcol="red",xtickpos=month,xticklab=month)) > > legend(5,13000,legend=c("Music","Actor"),text.col=c("black","red"),col=c("black","red")) > > #I tried to change t

[R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread Birdada Simret
Hi dear all, the following code is correct. but I want to use non-numeric x-axis, for example if I replace time <- seq(0,72,6) by month <- c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Pag") Ofcourse I use factor(month) instead of time; but I didn't get similar plo