similar to: Contrasts for a data

Displaying 10 results from an estimated 10 matches similar to: "Contrasts for a data"

2011 Feb 03
3
interpret significance from the contr.poly() function
Hello R-help I don’t know how to interpret significance from the contr.poly() function . From the example below : how can I tell if data has a significant Linear/quadratic/cubic trend? > contr.poly(4, c(1,2,4,8))               .L         .Q          .C [1,] -0.51287764  0.5296271 -0.45436947 [2,] -0.32637668 -0.1059254  0.79514657 [3,]  0.04662524 -0.7679594 -0.39757328 [4,]  0.79262909 
2000 Aug 13
2
Possible bug (PR#633)
2009 Mar 27
3
about the Choleski factorization
Hi there, Given a positive definite symmetric matrix, I can use chol(x) to obtain U where U is upper triangular and x=U'U. For example, x=matrix(c(5,1,2,1,3,1,2,1,4),3,3) U=chol(x) U # [,1] [,2] [,3] #[1,] 2.236068 0.4472136 0.8944272 #[2,] 0.000000 1.6733201 0.3585686 #[3,] 0.000000 0.0000000 1.7525492 t(U)%*%U # this is exactly x Does anyone know how to obtain L such
2010 Jul 16
3
how to skip a specific value when using apply() function to a matrix?
Hello R experts, I'd like to studentize a matrix (tmp1) by column using apply() function and skip some specific values such as zeros in the example below to tmp2 but not tmp3. I used the script below and only can get a matrix tmp3. Could you please help me to studentize the matrix (tmp1) without changing the zeros and generate a new matrix tmp2? Thanks, Joshua tmp1 [,1] [,2] [,3] [,4]
2008 Jan 12
2
glm expand model to more values
Hi I have the problem with fitting curve to data with lm and glm. When I use polynominal dependiency, fitted values from model are OK, but I cannot recive proper values when I use coefficents to caltulate this. Let me present simple example: I have simple data.frame: (dd) a: 1 2 3 4 5 6 b: 3 5 6 7 9 10 I try to fit it to model: model=glm(b~poly(a,3),data=dd) I have following data
2010 Sep 29
1
Understanding linear contrasts in Anova using R
#I am trying to understand how R fits models for contrasts in a #simple one-way anova. This is an example, I am not stupid enough to want #to simultaneously apply all of these contrasts to real data. With a few #exceptions, the tests that I would compute by hand (or by other software) #will give the same t or F statistics. It is the contrast estimates that R produces #that I can't seem to
2007 May 23
2
Fisher's r to z' transformation - help needed
I am trying to use Fisher's z' transformation of the Pearson's r but the standard error does not appear to be correct. I have simulated an example using the R code below. The z' data appears to have a reasonably normal distribution but the standard error given by the formula 1/sqrt(N-3) (from http://davidmlane.com/hyperstat/A98696.html) gives a different results than sd(z). Can
2002 Oct 24
3
Function scale (PR#2209)
I found a problem with scale function, while using center=FALSE and scale=TRUE: all column are not divided by standard error, but divided by sqrt (1/(n-1) sum Xi^2 ) Example: > l<- c(1,2,3) > scale(l,F,T) [,1] [1,] 0.3779645 [2,] 0.7559289 [3,] 1.1338934 attr(,"scaled:scale") [1] 2.645751 2.645751 = sqrt( 1/2 * (1+4+9) ) Antoine Lucas & Aymeric Labourdette
2012 Feb 20
0
repeating or looping within an apply statement to handle multiple variables
Dear R experts, I would like to please ask for your help with repeating steps in an apply statement. I have a dataframe that lists multiple variables for a given id and visit, as well as drug treatment. > head(exp) id visit variable1 variable2 variable3 variable4 drug 1 3 1 13 10 7 11 0 2 3 5 10 15 9 9 0 3 3 12
2010 Sep 08
4
coxph and ordinal variables?
Dear R-help members, Apologies - I am posting on behalf of a colleague, who is a little puzzled as STATA and R seem to be yielding different survival estimates for the same dataset when treating a variable as ordinal. Ordered() is used to represent an ordinal variable) I understand that R's coxph (by default) uses the Efron approximation, whereas STATA uses (by default) the Breslow. but we