I'm a little confused on the concept of modeling using a distribution - particularly, what is the level of analysis we are applying it to . .. .
If we have a dataset of say n=100, that is a realization of a random process. We could plot that data and look at that distribution, but if I understand it right, that is not the distribution of interest. I think that when we use distributions to model, we are talking about random variables, so the distribution we pick is to model what the data could have looked like given an underlying data generation process, right?
So , to make things simple, take one out of the 100 observations, obs_i. When we pick the distribution, we are modeling what value that single observation could have taken given an underlying process? We are not modeling what the collective 100 observation sample would look like for a given sample draw?
Or is this the same thing? If it is the same thing, will the distribution we use to characterize the potential values of a given observation always match the distribution for the sample?
EXL
When you start as a researcher with dataset, you might have a good intuition of the process that is creating your data, but you might not. My understanding , in general, is that you should build a model prior looking at your data (or use other data on the same phenomena to build the model). Is it considered "wrong" to histogram your data, and from that be informed of which distribution to select, or is that such a high level question that this kind of data-snooping is fine?
EXL
Hey folks,
As I mentioned in section, we're going to help those students still looking
for a co-author. If you're looking for a co-author to do a replication paper
with, then email me and Iain (not the list!) the following info:
Your name
Your email
Your program
Your research interests
Anything else relevant (maybe your location, or when you're free to work on
the paper, etc.)
Please do this by Sunday at midnight.
Iain and I will then compile the list and send it out to the class list on
Monday.
best, Maya
I'm running into trouble when I use alphas and betas in the prose of my
latex document and compile.
If I compile, for instance, "that x \ge \beta. Hence..." everything on
the line after the \beta ends up formatted in italics and without spacing.
Does anyone have any suggestions?
Thank you,
Jason
I'm getting totally lost in terminology. Here's the second paragraph of 3.4:
"Here is the procedure: randomly draw 1000 datasets by resampling with replacement the
observations from the data from section 3.32. Using a for() loop or the apply() function,
estimate the OLS coefficients for each bootstrapped dataset and store them in a matrix.
Once you have the 1000 estimates for each coecient in hand, estimate the standard errors
by taking the standard deviation of the simulated sampling distribution for each coefficient.
Add these estimates as a third column to your table from 3.3."
Terms I'm confused about:
"observation": a single row of x's and the corresponding y? Just the y? Just the x's?
"dataset": set of observations? set of 1000 observations? set of arbitrary number of observations?
Thanks,
Nick
Okay, in 3.3, (I've got the basics of the seed setting, etc.) I am
wondering if anyone else has had issues multiplying t(covs) %*% covs
- it says it needs numeric/complex matrix/vector arguments. But covs
is definitely a matrix...
~Meryl
If all we're doing on 3.3 is simulating y_is with our x_1s, x_2s, and
x_3s as well as an error component picked from a normal distribution,
isn't our beta vector just going to give us our coefficients already
given in the model of 3.2 if we feed in our x_is and our y vector?
I'm confused. Are we just hoping to see our coefficients again?
~Meryl
I seem to have the same issue, as Ashley: Error in x.mats %*% betas : requires numeric matrix/vector arguments
Obviously, %*% is a cross-product, and we do not need transcripts, if we use it, but nonetheless, I get to a singular matrix, and cannot "solve" it in order to get the inverse.
I tried everything.
Nino Malekovic
MPA Candidate, Class 2011
Harvard Kennedy School
________________________________________
From: gov2001-l-bounces at lists.fas.harvard.edu [gov2001-l-bounces at lists.fas.harvard.edu] On Behalf Of gov2001-l-request at lists.fas.harvard.edu [gov2001-l-request at lists.fas.harvard.edu]
Sent: Wednesday, February 03, 2010 11:33 PM
To: gov2001-l at lists.fas.harvard.edu
Subject: gov2001-l Digest, Vol 55, Issue 13
Send gov2001-l mailing list submissions to
gov2001-l at lists.fas.harvard.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
or, via email, send a message with subject or body 'help' to
gov2001-l-request at lists.fas.harvard.edu
You can reach the person managing the list at
gov2001-l-owner at lists.fas.harvard.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gov2001-l digest..."
Today's Topics:
1. Matrix multiplication (Ashley Anderson)
2. Re: Matrix multiplication (Jason Ketola)
3. Re: Matrix multiplication (Carly Knight)
4. Re: Matrix multiplication (Philipp Rottwilm)
5. 3.3 Question (Meryl Federman)
6. dumb 2.3 question (Nicholas Murphy)
7. Re: dumb 2.3 question (Mark Brewster)
8. Re: 3.3 Question (Jason Ketola)
----------------------------------------------------------------------
Message: 1
Date: Wed, 03 Feb 2010 19:11:18 -0500
From: Ashley Anderson <aaanders at fas.harvard.edu>
Subject: [gov2001] Matrix multiplication
To: Class List for Gov 2001/E-2001 <gov2001-l at lists.fas.harvard.edu>
Message-ID: <C78F7AD6.117C3%aaanders at fas.harvard.edu>
Content-Type: text/plain; charset="US-ASCII"
I'm trying to multiply my matrix by the betas I was given for problem 3.3,
but I keep getting the following message:
Error in x.mats %*% betas : requires numeric matrix/vector arguments
Here's my code: I'm pretty sure I'm doing this right so I don't know whats
up.
betas <- matrix(c(4,2,-3,1), ncol = 1, nrow = 4, byrow=T)
data <- read.csv("covs.csv", header=TRUE)
head(data)
ones <- c(rep(1,1000)
x.mats <- cbind(ones, data)
head(x.mats)
x.mats%*%betas
------------------------------
Message: 2
Date: Wed, 03 Feb 2010 19:43:16 -0500
From: Jason Ketola <jasonketola at gmail.com>
Subject: Re: [gov2001] Matrix multiplication
To: Class List for Gov 2001/E-2001 <gov2001-l at lists.fas.harvard.edu>
Message-ID: <4B6A1824.4020301 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Not sure if this is the whole problem since I don't have R open, but
you're missing a closing parenthesis on this line:
ones <- c(rep(1,1000)
Ashley Anderson wrote:
> I'm trying to multiply my matrix by the betas I was given for problem 3.3,
> but I keep getting the following message:
>
>
> Error in x.mats %*% betas : requires numeric matrix/vector arguments
>
>
> Here's my code: I'm pretty sure I'm doing this right so I don't know whats
> up.
>
> betas <- matrix(c(4,2,-3,1), ncol = 1, nrow = 4, byrow=T)
> data <- read.csv("covs.csv", header=TRUE)
> head(data)
> ones <- c(rep(1,1000)
> x.mats <- cbind(ones, data)
> head(x.mats)
> x.mats%*%betas
>
>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l at lists.fas.harvard.edu
> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
------------------------------
Message: 3
Date: Wed, 3 Feb 2010 19:49:19 -0500
From: Carly Knight <carly.r.knight at gmail.com>
Subject: Re: [gov2001] Matrix multiplication
To: "Class List for Gov 2001/E-2001" <gov2001-l at lists.fas.harvard.edu>
Message-ID:
<110408e71002031649q4cd82e5clbf6c1a1ec845bd01 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
X.mats needs to be a matrix. Try the as.matrix() function:
x.mats <- as.matrix(cbind(ones, data))
(you can use the function is.matrix() to test to make sure your object is a
matrix)
On Wed, Feb 3, 2010 at 7:11 PM, Ashley Anderson <aaanders at fas.harvard.edu>wrote:
> I'm trying to multiply my matrix by the betas I was given for problem 3.3,
> but I keep getting the following message:
>
>
> Error in x.mats %*% betas : requires numeric matrix/vector arguments
>
>
> Here's my code: I'm pretty sure I'm doing this right so I don't know whats
> up.
>
> betas <- matrix(c(4,2,-3,1), ncol = 1, nrow = 4, byrow=T)
> data <- read.csv("covs.csv", header=TRUE)
> head(data)
> ones <- c(rep(1,1000)
> x.mats <- cbind(ones, data)
> head(x.mats)
> x.mats%*%betas
>
>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l at lists.fas.harvard.edu
> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
--
Carly Knight
Ph.D. Student
Department of Sociology
Harvard University
Phone: (281) 682-4063
E-Mail: crknight at fas.harvard.edu
In the third part our homework, when we code our function for OLS coefficients/ancillary parameter/standard errors of OLS coefficients, do we use the standard version of linear regression or the alternative one, that professor King introduced in our first class?
I'll appreciate
Nino Malekovic
MPA Candidate, Class 2011
Harvard Kennedy School
________________________________________
From: gov2001-l-bounces at lists.fas.harvard.edu [gov2001-l-bounces at lists.fas.harvard.edu] On Behalf Of gov2001-l-request at lists.fas.harvard.edu [gov2001-l-request at lists.fas.harvard.edu]
Sent: Monday, February 01, 2010 12:00 PM
To: gov2001-l at lists.fas.harvard.edu
Subject: gov2001-l Digest, Vol 55, Issue 2
Send gov2001-l mailing list submissions to
gov2001-l at lists.fas.harvard.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
or, via email, send a message with subject or body 'help' to
gov2001-l-request at lists.fas.harvard.edu
You can reach the person managing the list at
gov2001-l-owner at lists.fas.harvard.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gov2001-l digest..."
Today's Topics:
1. Re: administrative issues (Lin, Eric)
----------------------------------------------------------------------
Message: 1
Date: Mon, 1 Feb 2010 11:27:12 -0500
From: "Lin, Eric" <elin at hbs.edu>
Subject: Re: [gov2001] administrative issues
To: Class List for Gov 2001/E-2001 <gov2001-l at lists.fas.harvard.edu>
Message-ID: <C78C6B10.4889%elin at hbs.edu>
Content-Type: text/plain; charset="iso-8859-1"
Trying to recall terminology from last term's gov2000:
If you have a series of explanatory variables, x1,x2, and x3, and you want to use matrix algebra to estimate OLS, you want to create a matrix with the first column as just 1's, followed by x1, x2, x3. What is this matrix formally called? Is this the "model matrix"?
Thanks!
EXL