You can get the ols coefficients with basic matrix operations as well (
https://files.nyu.edu/mrg217/public/ols_matrix.pdf) and by that avoid one
of the loops. I do not know how efficient this is but I have attached an
example you can paste bellow your code. Here, one x-array is used as a
right han
First, it may be a good idea to use 1 for âyesâ and 0 for ânoâ in the
motherrecovery column.
Then if you name your table e.g tab1, you may try something like this..
sum(tab1[,2]==1*tab1[,4])/sum(tab1[,2]==1)
2011/12/23 Joanie Van De Walle
>
> Hi,
>
> I need help writing a function
2 matches
Mail list logo