Skip to main content
Tweeted twitter.com/StackStats/status/1081837887417659392
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Source Link

I assumed that this was a result of repeated values, but I can't understand why x1 works (with lots of repeated values) while x2 doesn't work. I tried to get around this by using this advicethis advice, but without success.

I assumed that this was a result of repeated values, but I can't understand why x1 works (with lots of repeated values) while x2 doesn't work. I tried to get around this by using this advice, but without success.

I assumed that this was a result of repeated values, but I can't understand why x1 works (with lots of repeated values) while x2 doesn't work. I tried to get around this by using this advice, but without success.

added 54 characters in body
Source Link
Firebug
  • 19.5k
  • 6
  • 81
  • 144

y <- c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9, 0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2, 13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

y  <-  c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9,
0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2,
13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

Two examples of predictor variables are:

x1 <- c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2 <- c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 380, 303, 294, 330, 303, 405)

x1  <-  c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 
7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 
7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2  <-  c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 
315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 
409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 
492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 
380, 303, 294, 330, 303, 405)

y <- c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9, 0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2, 13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

Two examples of predictor variables are:

x1 <- c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2 <- c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 380, 303, 294, 330, 303, 405)

y  <-  c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9,
0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2,
13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

Two examples of predictor variables are:

x1  <-  c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 
7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 
7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2  <-  c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 
315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 
409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 
492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 
380, 303, 294, 330, 303, 405)
added 14 characters in body
Source Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663

y<y <- c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9, 0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2, 13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

x1<x1 <- c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2<x2 <- c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 380, 303, 294, 330, 303, 405)

A locally linear quantile regression using fit1 <- lprq(x1, y, h=1,tau=.9) works fine for x1. However, running fit2 <- lprq(x2, y, h=1,tau=.9) results in the following message:

y<-c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9, 0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2, 13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

x1<-c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2<-c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 380, 303, 294, 330, 303, 405)

A locally linear quantile regression using fit1 <- lprq(x1, y, h=1,tau=.9) works fine for x1. However, running fit2 <- lprq(x2, y, h=1,tau=.9) results in the following message:

y <- c(21, 1, 0, 0, 3, 0, 13, 6, 7, 3, 0, 5, 5, 3, 2, 10, 10, 4, 3, 9, 0, 0, 4, 9, 6, 1, 1, 8, 8, 2, 2, 8, 9, 2, 0, 0, 0, 6, 1, 9, 17, 14, 2, 13, 30, 4, 4, 7, 2, 5, 0, 15, 9, 4, 3, 5, 2, 1, 8, 1)

x1 <- c(7, 7, 9, 8, 8, 8, 8, 7, 8, 6, 6, 7, 10, 9, 8, 7, 8, 7, 6, 6, 6, 7, 9, 9, 8, 7, 7, 7, 7, 5, 6, 7, 9, 9, 8, 8, 9, 8, 7, 7, 7, 8, 8, 7, 9, 7, 8, 7, 7, 7, 6, 8, 8, 8, 8, 9, 9, 8, 9, 8)

x2 <- c(241, 304, 263, 301, 257, 445, 332, 329, 330, 269, 324, 338, 315, 309, 320, 311, 227, 297, 246, 339, 424, 394, 289, 381, 362, 334, 409, 304, 301, 350, 288, 288, 298, 403, 415, 503, 452, 302, 347, 369, 492, 441, 443, 369, 449, 311, 289, 274, 361, 449, 502, 371, 373, 312, 380, 303, 294, 330, 303, 405)

A locally linear quantile regression using fit1 <- lprq(x1, y, h=1,tau=.9) works fine for x1. However, running fit2 <- lprq(x2, y, h=1,tau=.9) results in the following message:

added 244 characters in body
Source Link
Dirk Snyman
  • 144
  • 1
  • 10
Loading
Source Link
Dirk Snyman
  • 144
  • 1
  • 10
Loading