I'm not sure what exactly you're looking for. If you've found the
programmed R function for the CDF of the t-distribution, that's really all
you need.
2009/3/18 Lauren Peritz <lauren.peritz at gmail.com>
Pardon the interruption. I meant for this question to
go to the list.
Thanks!
---------- Forwarded message ----------
From: Lauren Peritz <lauren.peritz at gmail.com>
Date: Wed, Mar 18, 2009 at 7:31 PM
Subject: Fwd: [gov2001-l] PS6 1.3
To: Patrick Lam <plam at fas.harvard.edu>
Hi Patrick,
Is there a good source for commonly used link functions? For the
t-distribution, in question 1.3 I've found the pre-programmed R function.
I've also found some generalized formulae employing the gamma function.
However, i'm still confused, despite your hints below. Any other advice?
Thanks,
Lauren
# "t-function" log-likelihood
tfunct.ll <- function(par, X, y){
#par=parameters
#X=matrix of covariates with intercept
#y=dependent variable
# how do we link parameters to distribution of y? delta <- (mu - m0) *
sqrt(n)/sigma?
delta <- par[1:ncol(X)]
out<-sum(y*log(pt(X,3,delta))+(1-y)*log(pt(X,3,delta)))
return(out)
}
---------- Forwarded message ----------
From: Patrick Lam <plam at fas.harvard.edu>
Date: Sun, Mar 15, 2009 at 1:45 AM
Subject: Re: [gov2001-l] PS6 1.3
To: gov2001-l at
lists.fas.harvard.edu
Hi Olena,
I'd go back and perhaps look at my section notes. Ask yourself the
following questions:
What are the parameters I'm trying to find here?
How do they relate to x and y?
How do I link my parameters to the distribution of y?
Also, if you managed to do the scobit problem correctly, then it's not that
much different here than that problem.
On Sat, Mar 14, 2009 at 9:11 PM, Olena Ageyeva <eageeva at hotmail.com>wrote:
Have anyone figured out what the formula is?
I tried to implement it exactly as it says in the PS, at least as I
understood it and I really doubt that it's right.
That is what from my understanding it should look like:
ll.t<-function(par,x,y)
{
delta=par
out<-sum(y*log(pt(x,3, delta))+(1-y)*log(pt(x,3,delta)))
return(out)
}
I have tried x%*%beta instead of x as well and have gotten weird results
which did not look right to me.
What am I doing wrong?
I have no studying partner and am really tight on time. Could anyone help
please?
Thanks!
Sincerely,
Olena Ageyeva
------------------------------
Windows Live? Groups: Create an online spot for your favorite groups to
meet. Check it
out.<http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_03200…
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
--
Patrick Lam
Department of Government and Institute for Quantitative Social Science,
Harvard University
http://www.people.fas.harvard.edu/~plam
_______________________________________________
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
--
Patrick Lam
Department of Government and Institute for Quantitative Social Science,
Harvard University