Displaying 5 results from an estimated 5 matches for "gamair".
Did you mean:
afair
2011 Jun 21
5
please help for mgcv package
i read a book from WOOD, there's an example which is talking about the
pollutant.
library(gamair)
library(mgcv)
y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr")+s(so2median,bs="cr")+s(o3median,bs="cr")+s(tmpd,bs="cr"),data=chicago,family=Possion)
lag.sum<-function(a,10,11)
{n<-length(a)
b<-rep(0,n-11)
for(i in 0:(11-10))
b&...
2012 Nov 13
0
GAM model to reduce PACF of a model
...the sites' mission as it is statistical question, thus I brought it here.
I am fitting a gam mode in the mgcv package to study associations of
environmental pollutants and mortality. The aim is to choose a model with
lowest mgcv and also to reduce the PACF to less than < |0.1|.
library(gamair)
library(mgcv)
data(chicago)
y<-matrix(0,12,5)
for (i in 1:12) {
testdf<-gam(death ~ pm10median + o3median + s(time,k=i*14,fx=T) +
s(tmpd,bs="cr"), data=chicago,family=poisson)
y[i,1]<-i
y[i,2]<-summary(testdf)$p.coeff[2]
ll<-summary(testdf)$p.coeff[2...
2007 Mar 26
1
Problem in loading all packages all at once
...uot;,"fortunes","forward")
TEMP <-
c(TEMP,"fpc","fPortfolio","fracdiff","frailtypack","fSeries","ftnonpar","FunCluster","fuzzyRankTests","g.data","gafit","gam","gamair","gamlss","gamlss.tr","GammaTest","gap","gbm","gclus","gcmrec","gdata","gee","geepack","genalg","Geneland","GeneNT","genetics","GeneTS","Ge...
2010 Jan 12
10
Conditional Sampling
Hi,
I am hoping someone can help me with a sampling question.
I am using the following function to sample 10 unique observations: x <-
sample(1:100, 10, replace=F)
Given the first 10 observations, I need to sample another 5 unique
observations from the remainder. I essentially want to do a Monte Carlo type
analysis on the results.
I would appreciate any feedback.
Thanks
--
View this
2013 Feb 17
3
Select components of a list
Hi Gustav,
Try this:
lapply(1:length(models),function(i) lapply(models[[i]],function(x) summary(x)$coef[2,]))[[1]] #1st list component
[[1]]
#??? Estimate?? Std. Error????? z value???? Pr(>|z|) # pm10
#5.999185e-04 1.486195e-04 4.036606e+00 5.423004e-05
#[[2]]
#??? Estimate?? Std. Error????? z value???? Pr(>|z|) #ozone
#0.0010117294 0.0003792739 2.6675428048 0.0076408155
#[[3]]
#???