If you known a bit of programming you can change dnorm in that code to do a
proper non-normal regression. Rank method will work just if you have a
large enough sample (central limit theorem).
https://github.com/dvdscripter/R-snippets/blob/master/regression.R

2012/1/8 Mahnaz Rabbaniha <rab.mahnaz@gmail.com>

>  Dear r-sig-ecology group,
> >
> > I am trying to find correlation between two variables. whereas they are
> non-normal used Spearman in this way:
>
> >  cor.test(SiO4,density,method="spearman")
>        Spearman's rank correlation rho
> data:  SiO4 and density
> S = 5263.445, p-value = 0.1184
> alternative hypothesis: true rho is not equal to 0
> sample estimates:
>      rho
> -0.296415
> > plot(SiO4, density)
>
>
> but i cant draw the line and in others same files, the problem is same
> and what is meaning this message:
>
> library (graphics)
> > abline(density~SiO4)
> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
>  plot.new has not been called yet
>
>
>
> .
> >
> > Many thanks in advance,
> > mahnaz
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>



-- 
Currículo: http://lattes.cnpq.br/7541377569511492

	[[alternative HTML version deleted]]

