search for: subval

Displaying 2 results from an estimated 2 matches for "subval".

2006 Jun 30
2
Passing arguments to glm()
Hi there I want to pass arguments (i.e. the response variable and the subset argument) in a self-made function to glm. Here is one way I can do this: f.myglm <- function(y,subfact,subval) { glm(d.mydata[,y]~d.mydata[,'x1'],family=binomial,subset=d.mydata[,subfact]==subval) } > str(d.mydata) `data.frame': 15806 obs. of 3 variables: $ y : Factor w/ 2 levels "no","yes": 1 1 1 1 1 1 1 NA 1 1 ... $ x1: Factor w/ 2 levels "no",&quot...
2012 Nov 23
1
Student-t distributed random value generation within a confidence interval?
Dear R-users! I?m faced with following problem: Given is a sample where the sample size is 12, the sample mean is 30, and standard deviation is 4.1. Based on a Student-t distribution i?d like to simulate randomly 500 possible mean values within a two-tailed 95% confidence interval. Calculation of the lower and upper limit of the two-tailed confidence interval is the easy part. m <- 30 #sample