similar to: logistic regression (glm binary)

Displaying 20 results from an estimated 120 matches similar to: "logistic regression (glm binary)"

2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment lines before data for each time interval. For each time interval there are 500 data points. I want to change the dataset such that I have the following format: t1 t2 t3 ................ 0.00208 0.00417 0.00625 ................. a1 a2 a3 ...................
2012 Feb 06
1
Creating time series (ts) object
Hi everyone. I have have a dataset with daily measurement from January 1st of 1966 up to December 31th of 2011. Here's the first part of the data: Date SLEV 1/1/1966 1.086 1/2/1966 1.079 1/3/1966 1.133 1/4/1966 1.261 1/5/1966 1.391 1/6/1966 1.571 1/7/1966 1.728 1/8/1966 1.823 1/9/1966 1.97 1/10/1966 1.804 1/11/1966 2.02 1/12/1966 2.017 1/13/1966 1.86 1/14/1966 1.96 1/15/1966 1.813 1/16/1966
2012 Jan 27
2
PosixCT subsecond accuracy
A sample of the data I have is: > head(sensor) logged_on accx accy accz compassx compassy compassz gyrox gyroy gyroz 1 1326561428000 -0.4602 0.8346 0.0936 0.145508 -0.350586 0.259766 59.617390 28.521740 59.617390 2 1326561428050 -0.4212 1.0452 0.1326 0.219727 -0.321289 0.241211 88.695656 27.478260 88.695656 3 1326561428100 -0.2496 1.3416 0.2886 0.214844 -0.326172
2013 Mar 12
5
extract values
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]>1820,]->x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007, 1.1795, 1.3855, 1.4065, 1.138, 1.514,
2012 Aug 11
1
unsued argument
It is a complex function, functions are quoted frequently, you may read from bottom up The independent variable for final fit is q %%Rg0 is a function of L and b Rg0sq<-function(L,b)L*b/6*(1-3/2*b/L+3/2*(b/L)^2-3/4*(b/L)^3*(1-exp(-2*L/b))) %%alpha is a defined function alpha<-function(x)(1+(x/3.12)^2+(x/8.67)^3)^(0.176/3) %%w is a defined function
2009 Aug 02
3
two-factor linear models with missing cells
I am wondering how to interpret the parameter estimates that lm() reports in this sort of situation: y = round(rnorm(n=24,mean=5,sd=2),2) A = gl(3,2,24,labels=c("one","two","three")) B = gl(4,6,24,labels=c("i","ii","iii","iv")) # Make both observations for A=1, B=4 missing y[19] = NA y[20] = NA data.frame(y,A,B) nonadd = lm(y ~
2010 Mar 17
2
y ~ X -1 , X a matrix
While browsing some code I discovered a call to lm that used a formula y ~ X - 1, where X was a matrix. Looking through the documentation of formula, lm, model.matrix and maybe some others I couldn't find this useage (R 2.10.1). Is it anything I can count on in future versions? Is there documentation I've overlooked? For the curious: model.frame on the above equation returns a
2012 Apr 23
1
How to test if a slope is different than 1?
Dear R-helpers, I would like to test if the slope corresponding to a continuous variable in my model (summary below) is different than one. I would appreciate any ideas for how I could do this in R, after having specified and run this model? Many thanks, Mark Na Call: lm(formula = log(data$AB.obs + 1, 10) ~ log(data$SIZE, 10) + data$Y) Residuals: Min 1Q Median 3Q
2005 Sep 20
1
Estimate predictor contribution in GAM models
hi, i'm using gam() function from package mgcv. if G is my gam object, then >SG=summary(G) Formula: y ~ +s(x0, k = 5) + s(x1) + s(x2, k = 3) Parametric coefficients: Estimate std. err. t ratio Pr(>|t|) (Intercept) 3.462e+07 1.965e+05 176.2 < 2.22e-16 Approximate significance of smooth terms: edf chi.sq p-value s(x0)
2011 May 23
1
Interpreting the results of the zero inflated negative binomial regression
Hi, I am new to R and has been depending mostly on the online tutotials to learn R. I have to deal with zero inflated negative binomial distribution. I am however unable to understand the following example from this link http://www.ats.ucla.edu/stat/r/dae/zinbreg.htm The result gives two blocks. *library(pscl) zinb<-zeroinfl(count ~ child + camper | persons, dist = "negbin", EM =
2005 Sep 23
1
Smooth terms significance in GAM models
hi, i'm using gam() function from package mgcv with default option (edf estimated by GCV). >G=gam(y ~ s(x0, k = 5) + s(x1) + s(x2, k = 3)) >SG=summary(G) Formula: y ~ +s(x0, k = 5) + s(x1) + s(x2, k = 3) Parametric coefficients: Estimate std. err. t ratio Pr(>|t|) (Intercept) 3.462e+07 1.965e+05 176.2 < 2.22e-16 Approximate significance of smooth
2009 Aug 13
4
lm coefficients output confusing
Hi all, I have an issue with the lm() function regarding the listing of the coefficients. My data are below, showing a list of hours (HR) relating to the time spent resting (R) by an individual animal. Simply i want to run a lm() to run in an anova() to see if there is a significant difference in resting between hours. HR R 1 2 0.6666667 2 2 0.4666667 3 2 0.8000000 4 2
2009 Nov 05
1
help with ols and contrast functions in Design library
Dear All, I'm trying to use the ols function in the Design library (version 2.1.1) of R to estimate parameters of a linear model, and then use the contrast function in the same library to test various contrasts. As a simple example, suppose I have three factors: feature (3 levels), group (2 levels), and patient (3 levels). Patient is coded as a non-unique identifier and is
2012 Sep 18
2
extracting column and regular interval in R
Dear R users, i have a matrix with 31 rows and 444 columns and i want to extract every 37th column of that matrix starting from 1. more precisely i want to select columns 1, 38,75, 112 and so on. then doing the same by starting from column number 2(2,39,76,113.......). i know that there is a manual way of doing it but i wanted to make it more quickly as i have fairly large data to dealth with.
2012 Oct 02
3
Integration in R
Dear R-users, I am facing problem with integrating in R a likelihood function which is a function of four parameters. It's giving me the result at the end but taking more than half an hour to run. I'm wondering is there any other efficient way deal with. The following is my code. I am ready to provide any other description of my function if you need to move forward.
2005 Mar 16
2
how to draw xyplot figure like figure 4.18 of MASS (4th) ?
Dear All: Could you please tell me how I can draw figure formatted like figure 4.18 of MASS (4th) with the attached data set? Thanks Zhongming Yang --------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sample.txt Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050316/abfdb85e/sample.txt
2007 Jan 19
4
Vectorize rearrangement within each column
Consider a matrix like > ma = matrix(10:15, nr = 3) > ma [,1] [,2] [1,] 10 13 [2,] 11 14 [3,] 12 15 I want to rearrange each column according to row indexes (1 to 3) given in another matrix, as in > idx = matrix(c(1,3,2, 2,3,1), nr = 3) > idx [,1] [,2] [1,] 1 2 [2,] 3 3 [3,] 2 1 The new matrix mb will have for each column the
2008 Mar 06
2
How to hold a value(Mean sq) with a string
Hi all: Can someone advice me on how to hold the residuals Mean sq value on a string so it can be used in other calculations. I was trying something like this: Msquare<-dfr$Mean sq but fails..Thanks dfr <- read.table(textConnection("percentQ Efficiency 1.565 0.0125 1.94 0.0213 0.876 0.003736 1.027 0.006 1.536 0.0148 1.536 0.0162 2.607 0.02 1.456 0.0157 2.16 0.0103
2009 May 15
1
anova(cph(..) output
Hello, I am a beginner in R and statistics, so my question may be trivial. Sorry in advance. I performed a Cox proportion hazard regression with 2 categorical variables with cph{design}. Then an anova on the results. the output is > anova(cph(surv(survival, censor) ~ plant + leaf.age + plant*leaf.age, > Mpnymph) Wald Statistics Response: Surv(survival, censored)
2010 Mar 15
0
Partial Credit Models using eRm
Hello all, I have just started using fitting the PCM (Partial Credit Model) using eRm and have 2 problems which I cannot solve, I have checked everywhere on the net, but no joy: Firstly, I have fit a PCM model to 10 variables with differing response categories (3 for the first 6 items, 4 for the following 2 and 2 for the last two items). mat1 <- matrix(c(rasch_bart$bart_bowel,