Displaying 4 results from an estimated 4 matches for "birthyear".
Did you mean:
birth_year
2011 May 11
1
Help with gam
...eally basic. Essentially, what I am trying to do is to generate the fitted values after the execution of the gam procedure and export them into Excel.
Here is my program:
ABC <- read.table("Incidence Data.csv", header=TRUE, sep=",")
incidence <- ABC[,1]
age <- ABC[,2]
birthyear <- ABC[,3]
fit<-gam(incidence~te(age,birthyear), family=poisson, fit=TRUE)
All this works. Now, how can I see the fitted values and copy them back to Excel?
Thank you very much,
Zsolt
[[alternative HTML version deleted]]
2011 Nov 10
0
Help with gam
...alues after the execution of the gam procedure
and export them into Excel.
>
> Here is my program:
>
> ABC<- read.table("Incidence Data.csv", header=TRUE, sep=",")
probably the next three lines can be omitted if you just say:
fit <- gam(incidence~te(age,birthyear), data=ABC, family=poisson, fit=TRUE)
<http://tolstoy.newcastle.edu.au/R/e14/help/11/05/1036.html#1040qlink2> >
incidence<- ABC[,1]
> age<- ABC[,2]
> birthyear<- ABC[,3]
> fit<-gam(incidence~te(age,birthyear), family=poisson, fit=TRUE)
>
<http://tolstoy...
2007 Mar 22
3
assign events on creation of a new user
...does work...
def event_ids=(list)
list ||= []
occurrences.delete_all
events << Event.find(list)
end
#######
####### This doesn''t work... assigning user''s default age specific
items when first created...
def assign_age_items
year = Time.now.year
birthyear = @user.dob.year
age = year - birthyear
events << Events.find_by_age(age)
end
USER CONTROLLER...relevant code
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
flash[:notice] = ''User was successfully created.&...
2009 Feb 23
1
"autonumber" for grouping variable
Dear R users,
my dataframe looks like this
head(dat)
Id sex byear age
1 300 m 2003 50
2 300 m 2003 36
3 402 f 2003 29
4 402 f 2003 21
5 402 f 2003 64
6 150 m 2005 43
...
...(where Id is just the Identification number of Individual, sex (male or
female), byear (=birthyear))
now, I 'd like to add a column, where each Individual gets an automated
number starting from 1, so that I can number them consecutively
something which should look like this:
Id sex byear age Number
1 300 m 2003 50 1
2 300 m 2003 36 1
3 402 f 2003 29 2
4 402 f 2003 21 2...