Displaying 3 results from an estimated 3 matches for "n_rep".
Did you mean:
_rep
2003 Dec 10
0
C++: SET_LENGTH() Over Many Iterations?
...\
do {\
UNPROTECT_PTR(v);\
SET_LENGTH(v, GET_LENGTH(v) + 1);\
PROTECT(v);\
INTEGER_POINTER(v)[GET_LENGTH(v) - 1] = x;\
}\
while (false)
SEXP R_SimplePushBackTest(SEXP args)
{
SEXP arg1, arg2, int_vect;
PROTECT(arg1 = AS_INTEGER(CADR(args)));
int n_reps = INTEGER_POINTER(arg1)[0];
PROTECT(arg2 = AS_LOGICAL(CADDR(args)));
bool full_alloc = (LOGICAL_POINTER(arg2)[0] ? true : false);
if (full_alloc)
PROTECT(int_vect = NEW_INTEGER(n_reps));
else
PROTECT(int_vect = NEW_INTEGER(0));
for (int i = 0; i < n_reps; ++i) {...
2003 Dec 12
3
C++: Appending Values onto an R-Vector.
Hi folks. I posted this question a few days ago, but maybe it got lost
because of the code I included with it. I'm having a problem using the
SET_LENGTH() macro in an R extension I'm writing in C++. In a function
within the extension I use SET_LENGTH() to resize R vectors so as to
allow the concatenation of single values onto the vectors -- it's a
"push back" function to
2001 Nov 16
2
pearson residuals in glm for binomial response (PR#1175)
...tel (direct) (44) 113-233-5103
Department of Statistics tel(secretary) (44) 113-233-5101
University of Leeds fax (44) 113-233-5090
Leeds LS2 9JT, England e-mail: J.T.Kent@leeds.ac.uk
Input:
x_1:4 # regressor variable
y_c(2,6,7,8) # response binomial counts
n_rep(10,4) # number of binomial trials
ym_cbind(y,n-y) # response variable as a matrix
glm1_glm(ym~x,binomial) # fit a generalized linear model
f_fitted(glm1)
rp1_(y-n*f)/sqrt(n*f*(1-f)) # direct calculation of pearson residuals
rp2_residuals(glm1,type="pearson") # should be pearson residuals...