[R] Prediction and plottiong of several effects against response with GAM (mgcv)

2006-12-06 Thread Torleif Markussen Lunde
Hi Using GAM (mgcv) I want plots of x against y. Using predict.gam when there is only one effect x works fine. However, when i want to make plots of several x agains y. Can this be done? I have tried using model.gam$model$x2 in pred.2.resp whitout making it work. Thanks Torleif Below is how

[R] Calculate NAs from known data: how to?

2006-10-17 Thread Torleif Markussen Lunde
%. Those p-values should be calculated from the real data. How can this be done in R, and what is the right way to do it? Sample number 1 is given below. Best regards Torleif Markussen Lunde length age sampleno 55 5 1 45 4 1 55 4 1 55 5 1 60 6

[R] Usage of repeat,while or loop. Documetation?

2006-07-06 Thread Torleif Markussen Lunde
Hi I want to run the loop described in the example below, but cannot find any good documentation on how to do it. I wold be very happy if someone could help me on this, as it would save me for a lot of work. Kindest regards Torleif University of Bergen/Norway #Sample 1 m-0 #35-40 #want to

[R] How to use function to change density in sm.density?

2006-05-10 Thread Torleif Markussen Lunde
I have trawl data (fish) for different areas. In each catch length of the different fish is registerd. However the real catch has to be calibrated because the trawl is selective. For fish=15cm the adjusted catch is (old.frequency*35/19) for fish15cm and 62cm the adjusted catch is