Thank, Olena!
On Thu, Apr 9, 2009 at 11:38 AM, Olena Ageyeva <eageeva at hotmail.com> wrote:
I think, you just need to use matrix operation %*%
for x%*%beta and
z%*%gamma.
I also have a question. Have anyone tried to use Zelig() for 2.4? Just
wanted to check my results and could not find which parameters to run it
with.
Sincerely,
Olena Ageyeva
------------------------------
Date: Thu, 9 Apr 2009 11:30:43 -0400
From: lauren.peritz at
gmail.com
To: gov2001-l at
lists.fas.harvard.edu
Subject: Re: [gov2001-l] Problem Set 7: How to load BioChemists data?
Hi All -
I'm still running into some difficulty with my R code for part 2.2,
receiving error messages regarding non-conformable arguments. Do you have
any thoughts on how to correct my log-likelihood function (below)? (The d
indicator variable is defined based on y being 0 or greater than 0).
Thanks in advance.
Lauren
zpoisson.ll.2 <- function(par, y, X, Z, d){
# create lambda and pi
l <- exp(X*(par[1]))
p <- 1/(1+exp(-Z*(par[2])))
# log-likelihood
out1 <- sum(d*(1/l))
out2 <-
sum((1-d)*(((p)-(log(p))*(data.frame(y)))+log(factorial(data.frame(y)))))
out <- out1+out2
return(out)
}
On Tue, Apr 7, 2009 at 10:02 AM, gus cooney <guscooney at gmail.com> wrote:
Once you load the package, I think you can just type:
bioChemists
-Gus
On Tue, Apr 7, 2009 at 10:00 AM, Alisha Holland <aholland at
fas.harvard.edu>wrote:
I was having a similar issue and finally pulled the data up using
data("bioChemists", package = "pscl")
head(bioChemists)
*From:* gov2001-l-bounces at
lists.fas.harvard.edu [mailto:
gov2001-l-bounces at
lists.fas.harvard.edu] *On Behalf Of *Sander, Thomas
*Sent:* Tuesday, April 07, 2009 9:22 AM
*To:* gov2001-l at
lists.fas.harvard.edu
*Subject:* [gov2001-l] Problem Set 7: How to load BioChemists data?
I have a simple question for PS7.
I figured out in problem 2.3 how to install pscl, namely
install.packages(?pscl?), but even though I see the BioChemists.rda data,
and have even copied this onto the directory where I store my R files, I
can?t seem to load it.
I?ve tried load, read.data, data, and none of these seem to work.
What have people found that works?
Many thanks.
Best.
Tom
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
------------------------------
Rediscover Hotmail?: Get e-mail storage that grows with you. Check it
out.<http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Redis…
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l