[R] combine lattice plot and standard R plot

2011-05-05 Thread Lucia Cañas
Thank you very much for your help and for your quick answers.

Lucía Cañás Ferreiro

Instituto Español de Oceanografía
Centro Oceanográfico de A coruña
Paseo Marítimo Alcalde Francisco Vázquez, 10
15001 - A Coruña, Spain

Tel: +34 981 218151  Fax: +34 981 229077
lucia.ca...@co.ieo.es
http://www.ieo.es



[[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.


[R] combine lattice plot and standard R plot

2011-05-04 Thread Lucia Cañas
Dear R users,

I would like to combine lattice plot (xyplot) and standard R plot (plot and 
plotCI) in an unique figure.

I use the function par() to combine plot and plotCI and I use the function 
print() to combine xyplot. I tried to use these functions to combine xyplot 
and plotCI and plots but they do not work. Does anybody know how I can do this?

Thank you very much in advance.




Lucía Cañás Ferreiro

Instituto Español de Oceanografía
Centro Oceanográfico de A coruña
Paseo Marítimo Alcalde Francisco Vázquez, 10
15001 - A Coruña, Spain

Tel: +34 981 218151  Fax: +34 981 229077
lucia.ca...@co.ieo.es
http://www.ieo.es



[[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.


[R] sm.ancova graphic

2010-11-22 Thread Lucia Cañas

Hi R-Users,

I am working with sm.ancova (in the package sm) and I have two problems with 
the graph, which is automatically generated when sm.ancova() is run.

1-Besides of the fitted lines, the observed data appeared automatically in the 
graph. I prefer that only fitted lines appear. I check the sm.options, but I 
could not find the way that  the observed data do not appear in the graph.

2-I would like to change the size of the numbers in the axis. Again,  I check 
the sm.options, but I could not find the correct way.



Thank you in advance,

Lucía 

[[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.


[R] Interactions in GAM

2010-09-08 Thread Lucia Cañas
Thank you so much for your answer, it has been really useful. I have already 
included the interactions in the models and I have obtained better results. 

Best regards,

Lucía Cañás



Lucía Cañás Ferreiro
Instituto Español de Oceanografía
Centro Oceanográfico de A Coruña
Paseo Marítimo Alcalde Francisco Vázquez, nº 10
15001 - A Coruña, SPAIN
e-mail: lucia.ca...@co.ieo.es
Tel: +34981205362; Fax: +34981229077
http://www.ieo.es



[[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.


[R] Interactions in GAM

2010-09-03 Thread Lucia Cañas
Hello R users,

I am working with the GAM to inspect the effect of some factors (year, area) 
and continuous variables (length, depth, latitude and longitude) on the 
intensity and prevalence of the common parasite Anisakis. I would like 
introduce interaction in my models, both continuous variables-continuous 
variables and continuous variables-factor. I have read some 
questions-answers regard to this subject but I still have doubts. 
The solution that I have seen to introduce an interaction continuous 
covariate-factor is using by (explained in ?gam.models). Below, I show an 
example of my model with the interactions using by both to prevalence 
(distribution=binomial) and to intensity (distribution=negative binomial):
 
gam(prevalence~s(length)+factor(year)+factor(area)+s(length,by=area)+s(length,by=year),
 family=binomial,data=X)

gam(intensity~s(length)+factor(year)+factor(area)+s(length,by=area)+s(length,by=year),
 family=negbin(c(1,10)),data=X)
 

The solution that I have seen to introduce an interaction continuous 
covariate- continuous covariate is using the function te. Below, I show an 
example of my model with the interactions using te both to prevalence 
(distribution=binomial) and to intensity (distribution=negative binomial):

gam(prevalence~s(length)+s(depth)+s(latitude)+s(longitude)+te(depth,length)+ 
te(latitude,length)+ te(longitude,length),family=binomial,data=X)
gam(intensity~s(length)+s(depth)+s(latitude)+s(longitude)+te(depth,length)+ 
te(latitude,length)+ te(longitude,length),family= negbin(c(1,10)),data=X)



My main doubts are: 
1.  Is the use of by and te right with the negative binomial 
distribution and with the binomial distribution?
2.  Do these interactions have the same meaning that the interaction 
factor*continuous covariate and continuous covariate* continuous covariate 
used in the GLM?
3.  Is right to introduce in the model the continuous covariates and the 
factor moreover their interactions?


Thanks in advance.

Best regards,

Lucía Cañás

Lucía Cañás Ferreiro
Instituto Español de Oceanografía
Centro Oceanográfico de A Coruña
Paseo Marítimo Alcalde Francisco Vázquez, nº 10
15001 - A Coruña, SPAIN
e-mail: lucia.ca...@co.ieo.es
Tel: +34981205362; Fax: +34981229077
http://www.ieo.es



[[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.